0
Welcome Guest! Login
0 items Join Now

Adding a javascript to J2.5 the right way

  • Adding a javascript to J2.5 the right way

    Posted 13 years 2 months ago
    • Ive had a good look around but can't find anything on these forums for J2.5?

      1. Where do I put the JS file?
      2. How do I get Gantry to load them?

      Many many thanks for helping,

      Garry
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Adding a javascript to J2.5 the right way

    Posted 13 years 2 months ago
    • 1. put it in js folder of the template
      2. add this to the head tag of the index.php of the template
      <?php $gantry->addScript('yourscript.js'); ?>
  • Re: Adding a javascript to J2.5 the right way

    Posted 13 years 2 months ago
    • Thank you so much!
      I was thinking it had to go in the Gantry js folder, but now i see the logic!
      Thanks once again, awesome help

Time to create page: 0.053 seconds