-
- 572 Posts
Hi,
I’ve never used PHx but i think i understand the concept although have yet to put it into practice.
My situation is that i have a couple of particular pages using specific javascript files and rather than adding links to all the javascript files in my {{head}} chunk i wondered if there was a way to do the following...
- Include JS files if page ID is equal to #3
Is this possible using a PHx if statement?
If i can do it this way it would mean i can limit the amount of templates i use which i like to keep to a minimum.
Thanks for any help
J
www.9thwave.co.uk
WEB | DESIGN | PRINT
-
- 5,888 Posts
you can put your js-blocks in different js-chunks and create a checkbox-TV jsBlocks with input-options:
JS A=={{jsA}}||JS B=={{jsB}}
in your head put
then you can check them on or off on your pages per checkboxes.
-
- 572 Posts
Hi Bruno,
Thanks for your answer.
Of course...i’d forgotten i could use TV’s!!
Cheers
J
www.9thwave.co.uk
WEB | DESIGN | PRINT