Hi, I'm trying to find a way of including two specific javascript files only as part of the homepage... could you let me know what the best way to do this is?
I sort of assume some sort of conditional statement in the header of the master template might be the best approach, whereby it only renders specific code when the pageid is the homepage one...
Another way of achieving this (presuming you have a different template for your home page) is to create a content place holder in your master template and then in your home page template (if derived from the master) enter the javascript files.
Conditional statement in the master template
Hi, I'm trying to find a way of including two specific javascript files only as part of the homepage... could you let me know what the best way to do this is?
I sort of assume some sort of conditional statement in the header of the master template might be the best approach, whereby it only renders specific code when the pageid is the homepage one...
Thanks!!
Tristan
Hi Tristan,
Something along this lines of:
Cheers,
/Dirk
Another way of achieving this (presuming you have a different template for your home page) is to create a content place holder in your master template and then in your home page template (if derived from the master) enter the javascript files.
Here is an example from one of my sites:
And then in the home page template I have:
Cheers
Paul
is working on a reply...