Closed (fixed)
Project:
Menu Trim
Version:
4.7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2006 at 19:42 UTC
Updated:
9 Mar 2007 at 01:46 UTC
Is there a site users could look at to get a visual sense of how the module works? It sounds very cool and interesting, but is hard to wrap my head around.
Comments
Comment #1
schittli commentedYes, that would be great! - I tried to configure Menu Trim but it never trim anything...
TIA & Kind regards,
thomas
Comment #2
david lesieur commentedI totally agree, this module would be much easier to understand with a demo site! The site for which I developed the module would be a great demo, but unfortunately it might not go online until a few more weeks. I'll try to find some time to setup a demo.
In the meantime, please have a look at the README.txt if you haven't yet. Unless I missed something, I think the step-by-step instructions will allow you to trim those menus. ;-)
Comment #3
faqing commentedI use trim menu at my site. It is a kind of context menu. You click top menu item, the side menu will display the submenus. You can look it here:
http://www.thanhsiang.org/faqing
Thanks David for develop this module. I am waiting for drupal 5 version. Please do continue to develop...
Lang
Comment #4
david lesieur commentedLang,
Thanks for the link!
Heh heh! You're already using Garland, so I guess I'll have to upgrade the module to 5.x real soon, because now people will expect it on 5.x. :-)
Comment #5
david lesieur commentedYou can now see Menu Trim in action on Québec solidaire's site.
Comment #6
newdru commentedRegarding your site example...
You have two top level menu items 'Le parti' and 'Regions et campus'
Can you confirm something for me please. I think you set up your menu trim options to work differently on each of the submenus "attached" to these top level menus correct?
1) For example, it appears that TOPMOST MENU ITEMS on the submenu for 'le parti' ALWAYS STAYS OPEN no matter how many levels deep you go.
2) However, 'Regions et campus' seems to "trim" or "clip" the HIGHER / TOP LEVEL menu items in the submenu when you drill into a child menu item. The only way to display the top or higher level menu items in the submenu is to use the breadcrumbs or click back on top menu link to "repopulate" them.
- Are my assumptions correct?
- If so, option1 is basically the same thing as going into block visibility and enabling menu only on certain paths (associated with top menu link paths of course) right?
- If so, does trim module offer any other benefits to achieving option 1 outside of ease of use for the end user versus using block visibility?
Also, regarding my statements above:
- what option do you set to achieve #1?
- what option do you set to achieve #2?
Thanks much. I think what your module does could be very useful. But I find the documentation a little unclear. Having an example SITE helps a ton but it doesn't answer all of my questions. What might be a good idea would be to step by step show how you created that menu 'Regions et campus' on that example site, using actual names for Primary menus and Secondary/Submenus as you go along versus generic names like 'menu' in your documentation.
fwiw, I think it's the term "trim" that's throwing me off. When I read the documentation it's not very clear which menu / menu item you set the trim option on. The one BEING TRIMMED (the child or lower level items) OR the ONE DOING THE TRIMMING (the higher level or parent menu)? And how you actually associate a PARENT MENU (primary) with a SUBMENU (child). That's where using an example with 'concrete' menu names would really help versus generic terms like 'menu'.
anyway just some thoughts that might help improve what looks like a potentially very useful module.
thanks much for your contributions to the community
Comment #7
david lesieur commentedAbout your two questions:
1) Yes, I was asked to expand these items by default. This expanding has nothing to do with Menu Trim, I simply checked the core "Expanded" option for the menu item.
2) Yes, items get trimmed as we drill down the "Régions et campus" menu. That is Menu Trim in action. :-)
On that site, there are only three distinct menus, the navigation menu (of course), the primary menu and the secondary menu. Primary and secondary links are set to the primary and secondary menus. Top-level items on the primary menu (e.g. "Régions et campus") are set for "Trim parent items" in order to show only their children in the left sidebar, and not show their siblings (e.g. I don't want "Actualité" and "J'appuie" to appear in the sidebar when the active menu is "Régions et campus").
Here's how the primary menu is structured:
Unfortunately, the above explanations will soon become outdated, because the site's menus will change a lot in a few days...
I had a hard time trying to document the module... Don't know why, maybe it's the user interface, or maybe it's my English! Suggestions for a better user interface, and doc contributions are very much welcome at any time. :-)
Comment #8
newdru commentedThanks for taking the time to post that example.. i actually had to walk through this a bit and just try my own example and i finally got it to work!
NOTES/Qs:
1) I had to set secondary links to "none" in admin/build/menu/settings so that the secondary links didn't display at the top of my primary links in the main nav. You seem to have enabled these in your example but it works fine in mine without setting secondary links to primary links. I'm kind of confused what that setting is for???
2) I wonder if the menu item option should be called "trim siblings" or "trim siblings and parents" instead of "trim parents". It seems that when you enable that option you are really trimming the sibling section menu items as well as the parent. It might be more clear (or maybe not :-)) to the users of this module
3) The way trim parents works right now for context submenus is that if i have a section menu item called "services" with submenu items, the submenu items are themed as links while the section menu header is simply themed a header tag (no link) probably as the block subject (i think). For example:
h2 services h2
-- href subitem1
-- href subitem2
However, would it be possible to make the block header "services" a link (since it is indead the section page) instead of a header? I'd prefer to have my section headers as links.
Do you have a snippet to amend your module and where would i patch it OR could i override a theme/change menu trim block.tpl.php to achieve this. If so do you have a tpl.php or template.php theme override?
4) For this module to perform it's magic to create the context submenus, all subitems of a section MUST be MENU ITEMS. At least i think so.
Lets say i have a top level section called "blogs". that main page is a teaser list of 10 latest blogs with PAGING (possibly created with views). under that section i have "links" and a "favorites" subitem pages. For example:
blogs ------> main blog view 10 teasers with paging (each post dynamic nodes not set to menu items)
-- links -----> static link page
-- favorites -> static link page
What happens to the context submenu when i click on the 'next" link to reach the second page (actually any 1+ page) of the blogs section page/view?... Will the submenu dissappear? I think it will because the second or 1+ teaser pager page of the blog's path will be different and not an actual menu item?
If that's correct - is there any way to fix it so the menu stays active when you click on the pager links?
I ask because for sections of a site that have subsection dynamic content that is being created all the time like a blogs, news, press releases, it would be impossible to create SUB menu items for all of those items on an ongoing basis. And even if you did, your submenus would become rediculously long.
- So how does one maintain submenu context when some of the submenu items will be dynamic (not menu items) using menu trim - eg. which settings would set that?
- If not with menu trim, is this even possible?
btw, thanks again. this is a very useful module.
Comment #9
david lesieur commentedHi newdru,
1) If you use Menu Trim for contextual secondary menus, then you probably either want to set the secondary links to another menu (completely separate from the primary links), or set them to none. But who knows, one might want to set the primary and secondary links to the same menu and use Menu Trim for tertiary contextual menus... :-)
2) I'm still unsure about the naming. Not a high priority on my todo list though... ;-)
3) To display a block's title as a link, I think you would have to theme your block. Menu Trim has no control over how blocks are rendered.
4) Should not be problem. When paging, Drupal preserves the context of the first page.
Comment #10
(not verified) commented