junior_developer_70
junior_developer_70

Reputation: 51

how to create a custom header and footer in drupal 7

how can i set a custom header and footer in template files in drupal 7?

is there any specific template like header.tpl.php or footer.tpl.php to customize it? can any one explain how?

I already wrote it in html.tpl.php but i do not no if it's correct or not

in html.tpl.php:

<header>

</header>

other stuf ...

<footer>

</footer>

Upvotes: 1

Views: 740

Answers (1)

Ali_Hr
Ali_Hr

Reputation: 4675

you can use ( php include ) and put your header and footer codes in two separate files with .inc format:

  1. in template folder create header.inc and footer.inc files and put your code in these files.
  2. now go to your html.tpl.php file and put the following code anywhere you want to display your header:
<?php include 'header.inc'; ?>
  1. and put the following code anywhere you want to display your footer:
<?php include 'footer.inc'; ?>

Upvotes: 1

Related Questions