0
Welcome Guest! Login
0 items Join Now

SOLVED Correct code Gantry template to include javascript

    • zeebeest's Avatar
    • zeebeest
    • Jr. Rocketeer
    • Posts: 20
    • Thanks: 0

    SOLVED Correct code Gantry template to include javascript

    Posted 12 years 9 months ago
    • Can anybody tell me what the correct code is to include a javascript file in the header of a Gantry template (based on rt_gantry_j16 for Joomla 1.7)?
      I'm looking for the right 'Gantry way', not the usual Joomla include. I looked at some of the Gantry templates with custom js, but I can't find the code in the index.php file that refers to the script so that makes me think that there is a different way in the Gantry framework to refer to javascript files.
    • Last Edit: 12 years 9 months ago by zeebeest.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Correct code Gantry template to include javascript

    Posted 12 years 9 months ago
    • drop your script into the js folder of your template and add this to head tag

      <?php $gantry->addScript('your-script.js');>
    • zeebeest's Avatar
    • zeebeest
    • Jr. Rocketeer
    • Posts: 20
    • Thanks: 0

    Re: SOLVED Correct code Gantry template to include javascript

    Posted 12 years 9 months ago
    • Thank you :)

Time to create page: 0.045 seconds