We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36549
    • 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
      • 4172
      • 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
      [*jsBlocks*]


      then you can check them on or off on your pages per checkboxes.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 36549
        • 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