How do I use a custom footer for some Pages

I want to add some javascript / tracking code to the footer of certain pages.

Should I add a customer .tpl file for the page or is there a way to add it from the admin to certain pages?

No votes yet

Replies

Custom code on certain pages

I would create a block similar to the answer here - How would I add a script to the bottom of every page in Drupal
Then on Page specific visibility settings select Show on only the listed pages and enter the pages you want this tracking code to appear on.
If I wanted to add a tracking code for this page I'd add
question/41/how-do-i-use-custom-footer-some-page
to the list of allowed pages for the block to appear on.

Your rating: None

Post new comment

 
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><code>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.