-
AuthorPosts
-
January 31, 2013 at 3:12 pm #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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
February 1, 2013 at 9:14 am #481975If 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
February 1, 2013 at 3:33 pm #482033I put my JavaScript in the CSS file? Seriously?
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
February 1, 2013 at 5:37 pm #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?
February 1, 2013 at 6:01 pm #482058I have a small bit of JavaScript that I need to add so it runs on every page on the site.
February 1, 2013 at 9:11 pm #482083If 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 ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
February 4, 2013 at 7:46 am #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
1 user says Thank You to Ninja Lead for this useful post
-
AuthorPosts
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