How creating a seprate front page template and get a current active theme path in drupal?


Hello Everyone!

Hope you are doing well.

1.How creating a seprate front page template :

Creating a front page template is rather simple. In your theme folder (sites/all/themes/), copy the page.tpl.php file from drupal core or your parent theme. Then rename it accordingly (see below). You probably won’t see the results until you clear your cache; so make sure to do that.

Drupal 7
In Drupal 7, copy the page.tpl.php file and name it page--front.tpl.php.

Drupal 6
In Drupal 6, copy the page.tpl.php file and name it page-front.tpl.php

2.How get a current active theme path :

For get a current active theme path in drupal always use php variable $directory

<?php print $directory; ?>

<img src="<?php print $directory; ?>/images/yourimage.gif" />

Enjoy post!

Advertisements

Sr. Software Engineer

Tagged with: , ,
Posted in Drupal
3 comments on “How creating a seprate front page template and get a current active theme path in drupal?
  1. Habibi says:

    Fantastic humans speeches and toasts, possibly toasts. are hands down transferred at some time through party and expected to turn into extremely funny, amusing not to mention educational inside the mean time. finest man wedding speeches

  2. gta 5 keygen says:

    Everything is very open with a precise explanation of the issues. It was definitely informative. Your site is very helpful. Many thanks for sharing!

  3. Yasmin says:

    Excellent blog you have here.. It’s hard to find good quality
    writing like yours these days. I honestly appreciate individuals like you!
    Take care!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: