Greetings all. New member, first post.

First of all, I'm completely impressed so far with Drupal and it's user base. Before making the switch, I used Mambo once or twice, and wasn't really feeling it. Installing and customizing Drupal and modules so far has been a pleasure.

My question is this: I'm developing a site for a local alt-weekly. This is the layout that I'm wanting for the site:

http://www.leovia.com/images/leo1.jpg
http://www.leovia.com/images/leo2.jpg
http://www.leovia.com/images/leo3.jpg

Where the homepage contains a synopsis of the cover story, with links to sections, with headlines. Specific sections would have the top story for that section, along with further subdivided categories, finally ending in an article page with content.

Since I'm a newbie, I have no idea how to go about customizing a template for this type of functionality. Can someone point me in the right direction? Any other threads that deal with the same issue?

thanks!

Comments

likoma’s picture

I'd love to have the layout of your leo1.jpg. I think summary.module does it, but I'm not sure as "pretty" as you have it there. I've also used Mambo (and kept coming back to Drupal) and it did that well. I'd like to see what other say about what you're asking.

- Bradley

nevets’s picture

If you want to contact me, we can discuss your needs in more detail. I have a module that I recently did and it might help you meet your goals

yelvington’s picture

We are working on something similar.

Spend a bunch of time with the phptemplate manual and other parts of the online documentation. Since the phptemplate system is full PHP, once you understand how pages are built from templated components you open the door to all sorts of interesting customizations.

The templating system may not necessarily be the "right" place to do some of the customization (since it tempts you to munge together business logic and presentation) but it can be done, and it can be done with clean separation if you are disciplined. In some cases a module -- existing or one you write yourself -- may be a better approach. I would encourage you to write a practice module just to get to know the system. It's easier than it looks and once you understand how to write one, you can solve a number of other problems such as integrating registration with other apps.

Back to presentation: Your article template is a no-brainer. The homepage can be implemented easily using the front_page module and some embedded php snippets.

Your section highlights pages are a bit tougher, but can be accomplished. There are a number of different ways to approach the problem, but you might want to start by looking into the Flexiblock module for Drupal 4.6. The 4.7 release will have flexible regions that might be a solution as well. And you could use a template specific to that page type and possibly also specific to the taxonomy term, with inlined PHP snippets to produce the link clusters.

In any case, you're going to have to do a bit of work to get around some minor shortcomings in the set of variables that are populated for any given template context.

For example, page templates do not know their own position in the taxonomy, nor do they necessarily know their own page type. They do know their node type, but a summary page isn't a node. :-(

You may need to extract the information from an existing variable -- the HTML-entangled $breadcrumb trail, for instance -- or you may need to dive deeper into the templating system and export some component-specific variable so that it's available at the page.tpl.php level.

Do be careful not to make a mess of business logic and HTML, or you'll hate yourself in the morning. One technique that we have used quite a bit is to strip page.tpl.php down to a bare minimum, examining variables (perhaps the URL string) and conditionally including reasonably clean context-specific template files.

strangeloop’s picture

thanks all! i'll be doing my research on phptemplate. any and all suggestions are appreciated!

merlinofchaos’s picture

The dashboard module I just submitted (but may not yet be approved) will do the structure you're looking for.

You can see examples of it at AssignBlame and my documentation page.

-- Merlin

[Read my writing: ehalseymiles.com]
[Read my Coding blog: Angry Donuts]

sangamreddi’s picture

Dashboard module is great. I have downloaded it from the cvs respositoriey.
It's simply supreb.

Sunny
www.gleez.com

pamphile’s picture

I love the concept layed out in those images...

success to you.. ! :)