Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Disable some js and css on frontpage only?

Disable some js and css on frontpage only?

Hello,
it is may be a stupid question, but can chameleon do that? For example i want k2.js, modal.js, lytebox.js and some others not to load on frontpage only, but load them on other pages. Is that possible?

dup
Beginner Modder
ranks
useravatar
Offline
15 Posts
Administrator has disabled public posting

Re: Disable some js and css on frontpage only?

If other components are loading these already then it's a little more difficult to remove them (though possible). However if you want to simply just add these to all pages apart from the front page using Chameleon then that's easy.

- Set up a rule
- detect the page type of the front page (or by menu item)
- in the Succeed action, "continue to next rule"
- in the Fail action, add the JS files that you want to put in the HEAD, using the "raw HTML for header" option. You'll need to put in the full "<script ..." version of the JS file things.

Hope that helps,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
4
User Info:
 
Total Users:
4378
Newest User:
miller2341
Members Online:
3
Guests Online:
124


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked