Keyword

Expandable menu option for the mod_tool

More
13 years 8 months ago #80470 by Markus Thiel
Replied by Markus Thiel on topic Expandable menu option for the mod_tool
That is exactly what I would like :)

Care to share the module? :)


Linda Cronsten said:

I managed to solve it as you can see on the page www.livsmedelssverige.se/hem/utbildningar.html. It's a hack using simple tree menu from dynamic drive. It took quite some time to get it right, but now it works. Not as good as I would like, but sufficient at least. Is this what you were looking for?
/Linda

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

  • Linda Cronsten
  • Linda Cronsten's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 8 months ago #80471 by Linda Cronsten
Replied by Linda Cronsten on topic Expandable menu option for the mod_tool
Hi Marcus. well, its not a module its a hack. I'm using the dynamic drive simple tree menu which can be found here. then I just changed a row  (row 297 in version 2.4.1)in the mod_k2_tools/helper.php 
$output .= '<ul class="level'.$level.'">';
to
$output .= '<ul id="treemenu1" class="treeview">';'

After that you just have to fix the CSS to make it work on your site. I don't remember right now but i don't thing I've made any  substantial changes, just layout.

Then you have to put the little javascript in your templatesfolder. So in templates/yourtemplate/html/mod_k2_tools/categories.php you'll just add the script that comes with the menu.
<script type="text/javascript">

//ddtreemenu.createTree(treeid, enablepersist, opt_persist_in_days (default is 1))

ddtreemenu.createTree("treemenu1", true)

</script>

 

I put the  .js file in templates/yourtemplate/javascript/simpletreemenu.js

The <script type="text/javascript" src="simpletreemenu.js"></script> I put in my own templatefile, template/yourtemplate/index.php

I think thats it. It's been awhile since I did it so I may have missed something. But try it and come back if it doesn't work. 

/Linda

Markus Thiel said:

That is exactly what I would like :)

Care to share the module? :)

Linda Cronsten said:

I managed to solve it as you can see on the page www.livsmedelssverige.se/hem/utbildningar.html. It's a hack using simple tree menu from dynamic drive. It took quite some time to get it right, but now it works. Not as good as I would like, but sufficient at least. Is this what you were looking for? /Linda

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

More
13 years 6 months ago #80472 by juju
Replied by juju on topic Expandable menu option for the mod_tool
@Linda : I try to follow your instructions, but Ican't get it work :/

 

In my file categories I have :

 

<div id="k2ModuleBox<?php echo $module->id; ?>" class="k2CategoriesListBlock <?php echo $params->get('moduleclass_sfx'); ?>">    <script type="text/javascript">        ddtreemenu.createTree("treemenu1", true)    </script>    <?php echo $output; ?>    </div>

 

In the file helper.php :

 

//$output .= '<ul class="level'.$level.'">';     (Ligne 297)$output .= '<ul id="treemenu1" class="treeview">';      (Ligne 298)

 

In index.php :

 

$document->addScript( "intranet.ville-wasquehal.fr/intranet/templates/ja_purity_ii/js/simpletreemenu.js" );

 

I don't put any special css, it is really necessary ?

 

With that, I have the list of categories, but when I click on them, nothing appear (not expends), in fact nothing has changed...

 

Can you help me a little please :)

 

Thanks ;)

 

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

More
13 years 4 months ago #80473 by juju
Replied by juju on topic Expandable menu option for the mod_tool
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.


Powered by Kunena Forum