Main/front page look and feel on other pages?

Events happening in the community are now at Drupal community events on www.drupal.org.
spessex's picture

I've hit a wall and hoping someone may be able to advise. I feel it is something simple but I just can't figure it out/get it to work!

If you can imagine I have a themed site, of which I have some main navigation links. All I want to be able to do is click on those navigation links and be sent to a page that looks exactly the same as the front page (themed the same), the only exception being the new page will have a different logo through css and perhaps different images. How do I do this? I have seen mention of changing the template.php of the theme which I have done but still can't get it to work. Can anyone advise. I've listed what I've done below:

  1. Created a new content type 'market_research'.

  2. Made a copy of page.tpl.php (it's more or less the same as page--front.tpl.php) and changed it's name to page--market-research.tpl.php

  3. Opened the template.php file within the theme (in sites/all/themes etc). Added the following function to the raft of code that was already contained within it:

/* New Content Type */

function [gomobile]_preprocess_page(&$vars, $hook) {
if (isset($vars['market_research'])) {
// If the node type is "blog_madness" the template suggestion will be "page--blog-madness.tpl.php".
$vars['theme_hook_suggestions'][] = 'page__market-research.tlp.php'. $vars['market_research']->type;
}
}

  1. Cleared the cache and it doesn't appear to work???

Hope someone can advise :-)

Cheers

Stephen

Comments

Context?

kiwimind's picture

Have you thought about using context?

I've recently done something similar, although my use case was about changing the colour of a sidebar menu's background.

If you add in a context for each of the landing pages, to add in a new css class (which goes on to the body tag), you can then style the logo in your stylesheet.

The different images on the page can either be done the same way, or changed in the content if they're part of the node.

HTH

Thanks

spessex's picture

Hi Shonk

I hadn't noticed your post until now.

Thank you. I'll take a look as it might be easier than the solution I used which was to create separate page.tpl.php

United Kingdom

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: