Keyword

Accordion categories menu

  • Alexandr
  • Alexandr's Avatar Topic Author
  • Offline
  • New Member
More
13 years 11 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>
<br/>    &lt;ul class="menu accordion collapsible"&gt;<br/>        &lt;?php echo $output; ?&gt;<br/>    &lt;/ul&gt;<br/>
2. File File \modules\mod_k2_tools\helper.phpand add before this line "modK2ToolsHelper::treerecurse($params, $row-&gt;id, $level + 1);" this line$output .= '&lt;ul class="acitem'.$level.'"&gt;'; and after "modK2ToolsHelper::treerecurse($params, $row-&gt;id, $level + 1);" add this line $output .= '&lt;/ul&gt;';
          $output .= '&lt;ul class="acitem'.$level.'"&gt;';          modK2ToolsHelper::treerecurse($params, $row-&gt;id, $level + 1);          $output .= '&lt;/ul&gt;';
3. In head of your index.php theme file add this:&lt;script src="&lt;?php echo $template_url; ?&gt;/js/jquery-1.4.2.min.js" type="text/javascript"&gt;&lt;/script&gt;    &lt;script src="&lt;?php echo $template_url; ?&gt;/js/menu.js" type="text/javascript"&gt;&lt;/script&gt;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

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

More
13 years 8 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

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

More
13 years 6 months 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 :

&lt;script src="&lt;?php echo $template_url; ?&gt;/js/jquery-1.4.2.min.js" type="text/javascript"&gt;&lt;/script&gt;    &lt;script src="&lt;?php echo $template_url; ?&gt;/js/menu.js" type="text/javascript"&gt;&lt;/script&gt;

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.

More
13 years 6 months 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...

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

More
13 years 6 months 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 = &amp;JFactory::getDocument();$document-&gt;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.

More
13 years 5 months 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...

 

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

More
13 years 4 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 ;)

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

More
13 years 4 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 &lt;head&gt; Tag the

&lt;link href="&lt;?php echo $this-&gt;baseurl ?&gt;/templates/YourTemplate/css/style.css" rel="stylesheet" type="text/css" media="screen" /&gt;

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.


Powered by Kunena Forum