Hi,

I'm about to help a friend out with a website, and he needed a CMS, and I thought Drupal would be a nice way to go.

Now, I'm pretty new to Drupal, and I have yet to figure a few things out. Perhaps someone here could guide me in the right direction.

The site that I'm converting to Drupal is http://defensa.se/page98590.html.
As you can see, the image below the menu changes for each link in the menu, and some pages have a sidebar with links to other pages.

How do I associate a node with a specific image for the header below the menu?

Should I create a region for the header image and somehow link each node with a header image? What's required to make this work?

Also, I'm curious to know how to create a View and list it as a sidebox to a specific page. I know how to create views, but I don't know how to list it as box content to a specific page.

For example. On the "Om Oss" page, I would like to list the 10 latest news nodes, to the right side of the content region. How should I go about making it?

Best regards,
dhatman

Comments

WorldFallz’s picture

Probably the easiest way is with the http://drupal.org/project/headerimage module. However, you can theme it yourself-- either with individual page.tpl.php files or with logic in the template.php file that determines which header image should be displayed and sets a variable that then gets printed in a single page.tpl.php file.

dhatman’s picture

Thank you so much, any advice is welcome!

Now, some further questions... hope you don't mind.

What do mean by individual page.tpl.php files?

How do I create an individual template file for the about_us view?

Should I create a block and then set it to display only on the page, like you write for frontpage?

How do I add a block view to display in the template file?

WorldFallz’s picture

What do mean by individual page.tpl.php files?

You can have as many page.tpl.php files as you need or want. If you click the link I provided above you can see what core drupal will detect by default.

How do I create an individual template file for the about_us view?

If it's a view, as opposed to a node, you just use the views path. For example, it the path is http://example.com/about-us then the tpl file would be 'page-about-us.tpl.php'. If it's actually a node, then you would use the node path (not the alias if you have one).

Should I create a block and then set it to display only on the page, like you write for frontpage?

you can if you want.

How do I add a block view to display in the template file?

You can embed it with views_embed_view (see views advanced help for more info) or simply create a block view and set the page visibility settings as desired at admin/build/blocks.

dhatman’s picture

Thanks a lot!
you've been very helpful.