- Posts: 1
COMMUNITY FORUM
Accordion categories menu
- Alexandr
-
Topic Author
- Offline
- New Member
Less
More
14 years 6 months ago #89479
by Alexandr
Accordion categories menu was created by Alexandr
Hi, I screwed to the standard module "list of categories (menu)" in k2_tools an accordion menu(used accordion menu from www.i-marco.nl/weblog/).1. File \modules\mod_k2_tools\tmpl\categories.php add before <?php echo $output; ?> this line <ul class="menu accordion collapsible"> and after <?php echo $output; ?> this line </ul>2. File File \modules\mod_k2_tools\helper.phpand add before this line "modK2ToolsHelper::treerecurse($params, $row->id, $level + 1);" this line$output .= '<ul class="acitem'.$level.'">'; and after "modK2ToolsHelper::treerecurse($params, $row->id, $level + 1);" add this line $output .= '</ul>';3. In head of your index.php theme file add this:<script src="<?php echo $template_url; ?>/js/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="<?php echo $template_url; ?>/js/menu.js" type="text/javascript"></script>4. Load the file menu.js and jquery-1.4.2.min.js to the your template js folder.5. load the file style.css to your template css folder.
works for me.But
one problem, I don `t know how to get to highlight and expand the
active category when you are on a page describing a particular product.Прослушать
На латинице
For example, at this page active category expanding _http://tds2010.com.ua/catalog/loktayt/fiksatory.html , but at detailed description of the position in this category, the active category is not highlighted and not disclosed, for example _http://tds2010.com.ua/loktayt/fiksatory/fiksatory-rezbovye/loktayt-638/10ml.html. Can anyone help in this problem? How can i add the root category ul class="active".Thank You.Sorry for my english and great thanks for this component!Alexander Ukraine
<br/> <ul class="menu accordion collapsible"><br/> <?php echo $output; ?><br/> </ul><br/>
$output .= '<ul class="acitem'.$level.'">'; modK2ToolsHelper::treerecurse($params, $row->id, $level + 1); $output .= '</ul>';
works for me.But
one problem, I don `t know how to get to highlight and expand the
active category when you are on a page describing a particular product.Прослушать
На латинице
For example, at this page active category expanding _http://tds2010.com.ua/catalog/loktayt/fiksatory.html , but at detailed description of the position in this category, the active category is not highlighted and not disclosed, for example _http://tds2010.com.ua/loktayt/fiksatory/fiksatory-rezbovye/loktayt-638/10ml.html. Can anyone help in this problem? How can i add the root category ul class="active".Thank You.Sorry for my english and great thanks for this component!Alexander Ukraine
Please Log in or Create an account to join the conversation.
- Shapes
-
- Offline
- Junior Member
Less
More
- Posts: 30
14 years 3 months ago #89480
by Shapes
Replied by Shapes on topic Accordion categories menu
Hi Alexander,
This trick seems really nice, I think I am going to try it.
Did yu manage to to get to highlight and expand the active category as you wished ?
Hoping for answers,
Best regards,
David aka Shapes
This trick seems really nice, I think I am going to try it.
Did yu manage to to get to highlight and expand the active category as you wished ?
Hoping for answers,
Best regards,
David aka Shapes
Please Log in or Create an account to join the conversation.
- Phearak
-
- Offline
- New Member
Less
More
- Posts: 1
14 years 1 month ago #89481
by Phearak
Replied by Phearak on topic Accordion categories menu
Hi, I had try to follow you, but it's not work.
Can you explain me on 3th point, I don't know where to past the :
<script src="<?php echo $template_url; ?>/js/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="<?php echo $template_url; ?>/js/menu.js" type="text/javascript"></script>
Please help, i really need your support, thank you so much,
This is my web: www.brandselection.net, I want to have subcategory to show the product.
Please help......
Can you explain me on 3th point, I don't know where to past the :
<script src="<?php echo $template_url; ?>/js/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="<?php echo $template_url; ?>/js/menu.js" type="text/javascript"></script>
Please help, i really need your support, thank you so much,
This is my web: www.brandselection.net, I want to have subcategory to show the product.
Please help......
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
Less
More
- Posts: 119
14 years 1 month ago #89482
by juju
Replied by juju on topic Accordion categories menu
@Phearak : Hi, I check your website, In your Category Menu, you display category AND articles inside them.
How you do that ? Because with the K2Tools module, I only have the list of category, not articles...
How you do that ? Because with the K2Tools module, I only have the list of category, not articles...
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
Less
More
- Posts: 119
14 years 1 month ago #89483
by juju
Replied by juju on topic Accordion categories menu
For the script, in my templates/Purity II/index.php I put that and the script are add in the head of the index.php :
$document = &JFactory::getDocument();$document->addScript( "intranet.ville-wasquehal.fr/intranet/templates/ja_purity_ii/js/jquery-1.4.2.min.js" );$document->addScript( "intranet.ville-wasquehal.fr/intranet/templates/ja_purity_ii/js/menu.js" );
But It don't change the module K2 Tools : List Categories at all, nothing has changed, the category are displayed that's all, did I forget something ?
$document = &JFactory::getDocument();$document->addScript( "intranet.ville-wasquehal.fr/intranet/templates/ja_purity_ii/js/jquery-1.4.2.min.js" );$document->addScript( "intranet.ville-wasquehal.fr/intranet/templates/ja_purity_ii/js/menu.js" );
But It don't change the module K2 Tools : List Categories at all, nothing has changed, the category are displayed that's all, did I forget something ?
Please Log in or Create an account to join the conversation.
- rexkramer
-
- Offline
- Senior Member
Less
More
- Posts: 71
14 years 3 weeks ago #89484
by rexkramer
Replied by rexkramer on topic Accordion categories menu
One interesting source could be the XMAP component and the K2 Xmap Plugin. As far as i know it expands the K2 categories to all included items... maybe worth a look?!
Another interesting thing about Xmap is the editor Link plugin! Its an editor extend button, which traces the K2 categories in a modal window. I do not remember the appearance, but it could be a Tree-like interface...
Another helping source could be the Editor JCE and the K2 AdvancedLink plugin. This has a Javascript? powered tree view...
Another interesting thing about Xmap is the editor Link plugin! Its an editor extend button, which traces the K2 categories in a modal window. I do not remember the appearance, but it could be a Tree-like interface...
Another helping source could be the Editor JCE and the K2 AdvancedLink plugin. This has a Javascript? powered tree view...
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
Less
More
- Posts: 119
13 years 11 months ago #89485
by juju
Replied by juju on topic Accordion categories menu
Really interesting : extensions.joomla.org/extensions/extension-specific/k2-extensions/16775
I think i'm goind to buy it ;)
I think i'm goind to buy it ;)
Please Log in or Create an account to join the conversation.
- Dora Micha
-
- Offline
- New Member
Less
More
- Posts: 1
13 years 11 months ago #89486
by Dora Micha
Replied by Dora Micha on topic Accordion categories menu
Hi, Alexandr, thank you for this great extension of K2Tools,
I have already managed to make your code to work for me (*), but i would like to ask you and of course anybody who could help, and as a further improvement of your work:
" How we can make this menu to stays open when the user loads a selected category"?
(*)This is what i use to make it work
1. Step is to replace the code as it mentioned before
2. Step Add to your index.php file in the <head> Tag the
<link href="<?php echo $this->baseurl ?>/templates/YourTemplate/css/style.css" rel="stylesheet" type="text/css" media="screen" />
and the style.css in your CSS Folder of your Template
3. Step in order to load JQuery i used the Plugin: SC JQuery
and i have put the code from menu.js
I have already managed to make your code to work for me (*), but i would like to ask you and of course anybody who could help, and as a further improvement of your work:
" How we can make this menu to stays open when the user loads a selected category"?
(*)This is what i use to make it work
1. Step is to replace the code as it mentioned before
2. Step Add to your index.php file in the <head> Tag the
<link href="<?php echo $this->baseurl ?>/templates/YourTemplate/css/style.css" rel="stylesheet" type="text/css" media="screen" />
and the style.css in your CSS Folder of your Template
3. Step in order to load JQuery i used the Plugin: SC JQuery
and i have put the code from menu.js
Please Log in or Create an account to join the conversation.