- Posts: 28
COMMUNITY FORUM
Expandable menu option for the mod_tool
- Linda Cronsten
-
Topic Author
- Offline
- Junior Member
And another nice feature would be if you could search just one parent category and it's sub.categories. As it is now I have to use so many differerent kind of modules to make all of this work and It would be so nice just to be able to switch to K2 and have it all there. :-)
Please Log in or Create an account to join the conversation.
- Heislyc
-
- Offline
- New Member
- Posts: 2
Please Log in or Create an account to join the conversation.
- Concerto Designs Inc.
-
- User
I'm working on a huge K2 corporate site with custom modules for everything - a real juggernaut. One request from the client is to have an expandable 'tree' accordion for archived items å la the twitter blog:
blog.twitter.com/
I've gone through the K2 tools mod, but I don't have enough (i.e. any) php skills to add the item titles as a nested ul inside the month listing li's in the archive.php. If anyone could provide that part, I can handle the javascript and css, no problem. I have already built an accordion widget for all of my sidebar mods (K2, JCalPro, DocMan, mod custom html, whatever).
Thanks in advance -
Alan
Please Log in or Create an account to join the conversation.
- Heislyc
-
- Offline
- New Member
- Posts: 2
Alan Smith said:Hello: I'm working on a huge K2 corporate site with custom modules for everything - a real juggernaut. One request from the client is to have an expandable 'tree' accordion for archived items å la the twitter blog: blog.twitter.com/ I've gone through the K2 tools mod, but I don't have enough (i.e. any) php skills to add the item titles as a nested ul inside the month listing li's in the archive.php. If anyone could provide that part, I can handle the javascript and css, no problem. I have already built an accordion widget for all of my sidebar mods (K2, JCalPro, DocMan, mod custom html, whatever).
Thanks in advance -
Alan
Please Log in or Create an account to join the conversation.
- Concerto Designs Inc.
-
- User
Thanks for the suggestion & link. I really need a way to nest the actual item titles inside the top level archive (Month Year) ul-li's in the archive.php. The call to the categories is set up differently because the db query is straightforward (retrieve cat ids). In the case of the archived items, it would require a query of the date range for each archived month.
I also am leery of adding another JQuery widget to the site - I'm already using JQuery superfish for a dropdown menu, along with a lot of other AJAX widgets. The very nice LOF K2 slideshow, for example, simply breaks down in the site. So the accordion I would implement would have to use Mootools, It's really an issue of event handling - running JQuery in 'no conflict' mode can help sometimes, but not in this case.
If I can get some idea how to output the item tiles (linked) inside the archive month li's, the rest will be relatively easy.
Thanks again!
-Alan
Please Log in or Create an account to join the conversation.
- Nilesh Toshniwal
-
- Offline
- New Member
- Posts: 19
Try the attached module, but on development site only, 1 problem that I have noticed is, it doesn't work properly with sef urls, though I may work on this module later on but cant say in how much time. May be someone can help me enhancing this module.
Please Log in or Create an account to join the conversation.
- Linda Cronsten
-
Topic Author
- Offline
- Junior Member
- Posts: 28
/Linda
Please Log in or Create an account to join the conversation.
- Nilesh Toshniwal
-
- Offline
- New Member
- Posts: 19
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.
- Concerto Designs Inc.
-
- User
Thank you so much for the mod - it looks really promising. What I actually need, however, is not an expandable tree of categories, but rather an expandable tree of items listed under their month-year date range(s). See the output from the archive option in the k2_mod_tools - that's what I'm trying to build.
Linda:
Your site looks GREAT! I wish had more swedish - I've seen enough Bergman films and read all of Henning Mankell's novels, so I feel like I have been learning swedish by osmosis...
Kind regards,
Alan
Please Log in or Create an account to join the conversation.
- Nilesh Toshniwal
-
- Offline
- New Member
- Posts: 19
hope fully I can get time next week to tweak this module in this way, even I had plan to develop archive module too for a huge blog site I am developing, but I submitted the one I had ready with me. will try to get it ready asap. meanwhile keep posted if you find something better. :)
Nilesh
Alan Smith said:Nilesh: Thank you so much for the mod - it looks really promising. What I actually need, however, is not an expandable tree of categories, but rather an expandable tree of items listed under their month-year date range(s). See the output from the archive option in the k2_mod_tools - that's what I'm trying to build.
Linda:
Your site looks GREAT! I wish had more swedish - I've seen enough Bergman films and read all of Henning Mankell's novels, so I feel like I have been learning swedish by osmosis...
Kind regards,
Alan
Please Log in or Create an account to join the conversation.
- Markus Thiel
-
- Offline
- Premium Member
- Posts: 149
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
-
Topic Author
- Offline
- Junior Member
- Posts: 28
$output .= '<ul class="level'.$level.'">';
$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.
- juju
-
- Offline
- Premium Member
- Posts: 119
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.
- juju
-
- Offline
- Premium Member
- Posts: 119
I think i'm goind to buy it ;)
Please Log in or Create an account to join the conversation.