Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • megana Friend
    #184559

    I need to add some custom JavaScript to the template. Normally I would just edit “templates/(TEMPLATENAME)/index.php”.

    I found this topic: http://www.joomlart.com/forums/topic/how-to-add-custom-jscss/ But I don’t have “templates/<YOUR TEMPLATE NAME>/tpls/blocks/head.php”. I don’t have a tpls folder…I did find a blocks folder, but no head.php in it. I tried just creating a head.php in that folder, and then my custom JS worked but all the CSS from the template didn’t. What’s the correct way to do this for this template?

    Ninja Lead Moderator
    #481975

    If you would like to customize on your site (using JA Teline IV template). You can follow as below

    + Put it here
    <blockquote>templates/ja_teline_iv/css/template.css</blockquote>

    + After the change you need to clean cache from Admin area

    megana Friend
    #482033

    I put my JavaScript in the CSS file? Seriously?

    TomC Moderator
    #482051

    <em>@megana 358149 wrote:</em><blockquote>I put my JavaScript in the CSS file? Seriously?</blockquote>

    What is it you’re trying to accomplish?

    megana Friend
    #482058

    I have a small bit of JavaScript that I need to add so it runs on every page on the site.

    megana Friend
    #482083

    If you’re concerned that I’m destroying your lovely template somehow…what the JavaScript will do is just find existing image captions (previously added by JCE’s caption plugin) and set them as the image titles, so they’ll show up in the nice thumbnail/gallery plugin for each article. 🙂

    Ninja Lead Moderator
    #482284

    <em>@megana 358181 wrote:</em><blockquote>I have a small bit of JavaScript that I need to add so it runs on every page on the site.</blockquote>

    You can add JavaScript file on JA Template
    <blockquote>Admin->Extensions->Template Manager->JA_Teline_IV – Default->Layouts Tabs->edit Default</blockquote>
    from

    <!--Extra css load for this layout-->
    change to

    <!--Extra css load for this layout-->
    <scripts>
    <file>js/your_custom_file.js</file>
    </scripts>

    With js path: templates/ja_teline_iv/js/your_custom_file.js

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 3 voices, and was last updated by  Ninja Lead 11 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum