user1704548
user1704548

Reputation: 75

Drupal 7 theme "front" differs from other pages

I need a custom template for the 'frontpage' and a custom template for all the other pages.

What are the best practices to accomplish this?

Do I need to make 2 themes or can I use the same theme?

Upvotes: 2

Views: 872

Answers (3)

Lars Wikman
Lars Wikman

Reputation: 366

I would like to direct you towards "The Drupal Way" (do it with flexible UI-based modules) if you are not already familiar with.

I would approach this problem using Panels and possibly Views if you need to display listed information on the page (such as a news-feed or similar).

This gives a whole different approach to setting up your site's content displays and it is the general direction of the Drupal ecosystem.

Upvotes: 2

Glenn B
Glenn B

Reputation: 21

If you're new to Drupal theming, try using the Devel and the Themer Developer module (http://drupal.org/project/devel_themer)

Upvotes: 2

Muhammad Reda
Muhammad Reda

Reputation: 27043

Create 2 template files:

  1. page--front.tpl.php for the front page.

  2. page.tpl.php for other pages.

For further reading, check out Drupal 7 Template Suggestions.

Don't forget to clear the site cache after the creation of each new template file.

Hope this helps... Muhammad.

Upvotes: 3

Related Questions