Keyword

add jquery files to sub templates

  • Naama Suissa
  • Naama Suissa's Avatar Topic Author
  • Offline
  • New Member
More
11 years 9 months ago #108136 by Naama Suissa
add jquery files to sub templates was created by Naama Suissa
Hi,
I am customizing the category.php to display a list of all items and then need to manipulate the list using jquery.
I begun by using category.php and changing it.
My questions are:
1. Is this the correct approach or should I modify something else (and how :dry: )
2. How do I attach custom js files to my sub template?

thanks a lot!
N.

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago - 11 years 9 months ago #108137 by Lefteris
Replied by Lefteris on topic Re: add jquery files to sub templates
Hi. Regarding your questions:

1. You should not modify the core K2 files. You need to override them. Take a read at getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates for more information.

2. You need to know PHP for this:
<?php
$document = JFactory::getDocument();
$document->addScript('URL_TO_YOUR_SCRIPT');
?>

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum