- Posts: 92
COMMUNITY FORUM
[SOLVED] How to Unset K2.js File?
- Mr_Anonymous
-
Topic Author
- Offline
- Premium Member
Less
More
10 years 2 months ago - 10 years 2 months ago #136162
by Mr_Anonymous
How to Unset K2.js File? was created by Mr_Anonymous
I am trying to remove the k2.js file from my template so I can add that directly to my site javascript. What is the best way I can achieve this? I tried adding unset to my template's index.php file but this is not working:
Also, I noticed that the k2.js has url like this:
Why does it have all that extra info after '?'
This url is preventing mod_pagespeed from minifying, combining and caching k2.js files. Thats why I am trying to merge that with my site js and remove the k2.js from loading separately. Can you guide me here please?
I am using Joomla 3.3.6 with K2 2.6.9
unset($this->_scripts['/components/com_k2/js/k2.js']);
Also, I noticed that the k2.js has url like this:
/components/com_k2/js/k2.js?v2.6.8&sitepath=/
Why does it have all that extra info after '?'
This url is preventing mod_pagespeed from minifying, combining and caching k2.js files. Thats why I am trying to merge that with my site js and remove the k2.js from loading separately. Can you guide me here please?
I am using Joomla 3.3.6 with K2 2.6.9
Last edit: 10 years 2 months ago by Mr_Anonymous.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 2 months ago #136189
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic How to Unset K2.js File?
Hello there,
This post will help you www.joomlaworks.net/forum/k2-en/33253-how-to-unset-k2-js#116718
This post will help you www.joomlaworks.net/forum/k2-en/33253-how-to-unset-k2-js#116718
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Mr_Anonymous
-
Topic Author
- Offline
- Premium Member
Less
More
- Posts: 92
10 years 2 months ago #136230
by Mr_Anonymous
Replied by Mr_Anonymous on topic How to Unset K2.js File?
Perfect. thanks for that link. I found that topic mentioned somewhere else but couldnt get to the link. It kept taking me to advanced search page. This link you had posted now works and it answers my question.
Cheers :)
Neel.
Cheers :)
Neel.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 2 months ago #136239
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic How to Unset K2.js File?
You 're welcome Neel :)
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Mr_Anonymous
-
Topic Author
- Offline
- Premium Member
Less
More
- Posts: 92
10 years 2 months ago - 10 years 2 months ago #136273
by Mr_Anonymous
Replied by Mr_Anonymous on topic How to Unset K2.js File?
For the completion of this thread, this is what I am using for v2.6.9:
unset($this->_scripts[JURI::root(true).'/components/com_k2/js/k2.js?v2.6.9&sitepath='.JURI::root(true).'/']);
Last edit: 10 years 2 months ago by Mr_Anonymous.
Please Log in or Create an account to join the conversation.