Menu of structures - menu

I'd like to have main menu in wiki part of Tiki Wiki. It should have following top-level items:
About
Atlas
Encyclopedia
Now the tricky part: I'd like to link each of above top-level menu items to corresponding structure so that hovering over Atlas opened sub-menu taken from Atlas structure.
I can make static menu like About/Atlas/Encyclopedia. I can make dynamic menu out of one structure so that top-level structure items become top-level menu items. Basically I need a menu out of structure but in such a way that it is structure's root that becomes top-level menu element. And then place three such structures horizontally.
Alternatively I could do it by nesting structures. Is it possible? And in such a way that it can be turned into nested menu?

I just stumbled over your question today and I hope my answer still can be a help for you.
Imho the right approach is to create a custom module and in the custom menu a "toplevel menu" with some simple html. The menu consists out of the three top items and for each one the appropriate structure menu as list element.
You want a horizontal menu, right?
The menu items "About", "Atlas", "Encyclopedia" representing your three wikistructures would be kind of drop down (or hover effect) horizontal css menu items level=0 (to) for example in a top-bar custom module.
You hover over one of the menu items and the associated wikistructure menu appears.
Regards,
Torsten

Well, I settled with "hybrid" solution. I have a structure like that:
Root
About
Intro
Setting
Encyclopedia
Organizations
Technology
Atlas
Inner system
Outer system
I created a "Root" page and made a Structure out of it.
Then I created first-level pages in that structure.
In next step I created those second-level pages - but as separate
pages, not part of "Root" structure.
Every such second-level entry was made a Structure and sub-pages were created in those secondary structures.
Then I added each second-level page (being a root of second-level structure) to main "Root" structure.
"Root" structure was then declared as main menu: in Manage > Modules > Assigned modules > Topbar I added "Menu" module and set structureId of "Root" structure.
So basically it's this alternative of nested structures I asked about. It does solve my problem of having tree-structure for menu that isn't overloaded by every minute page on wiki I'd like to have. On one hand it doesn't show all the entries but on the other hand it's good - the reader isn't overwhelmed and still can access deeper pages by second-level pages that have all the sub-structure listed.

Related

drupal 7 nodes listed in views are not attached to the menu, but need to be

Using Drupal 7, I am displaying news articles via a View. The view is linked into the menu, naturally, but as a consequence the news articles are not. This becomes an issue because when an article's detail page is displayed, the site loses the active trail and consequently the breadcrumb trail and the left-hand secondary navigation menu lose their place.
Is there some way of setting the menu to think it's in a certain place within the menu tree, eg. Your College -> Life at the College -> News & Events?
I've seen menu_tree_set_path, which looks promising, but haven't seen an example of how it's used (at least in terms an Enthusiastic Amateur like myself would get).
As ever, any and all assistance given is greatly appreciated,
~Matt
The Context module will allow you to set the active trail of a drupal menu dependant on paths etc.
https://drupal.org/project/context
When you're dealing with breadcrumbs, an easy way to achieve breadcrumbs on a per content type basis (and others) is the custom_breadcrumbs module.
On a separate note, if you want to display full menus, look at the menu_block module. We used this plus the menu_tree_set_path() function to display local menus on nodes that weren't in menus.
$config = menu_block_get_config(1);
$path = "node/{$nid}";
menu_tree_set_path($config['menu_name'], $path);
$data = menu_tree_build($config);
The number passed to menu_block_get_config(), is the delta of the menu_block configuration in blocks.
With $data you can use a drupal_render or pass it back to another theme rendering function.

How can we create sub modules in boilerplate.js

I have a design,
Where Im having lots of products and then each product has lots of sub products.
So Now in the First Screen I want to show a dashboard which will show all of my products.
On click of each product I want to open a separate view with its own left side navigation bar and detail view. These will be my main modules
now options in left side menubar will be my sub-products. Now click of any subproduct. I want to change my detail view. These will be my sub modules
Please share some sample example if you have with yourself
Thanks in advance.
BoilerplateJS supports having nested contexts. More information is available under 'Product Modules' section in boilerplatejs.org. A nested context can be created by passing the parent context in to the child context when creating it. You can create a context for each of your products. And within that context you can create modules, which will be your sub products. Having this type of a modular structure would help you in maintaining your code.
Implementing your requirement can be done in many ways.
One method is to structure the urls of your application as follows:
www.myapp.com/index.html#productA/submodule1
www.myapp.com/index.html#productB/submodule1
You can implement the menu as a seperate module, where it will change the menu that needs to be displayed according to the first portion (productA, productB) of your URL, and your sub modules can be activated/de-activated according to the rest of the URL portion. This method allows you to bookmark the pages and bring it to the same state when a bookmarked link is triggered.

How to have different secondary menus for groups of pages in Orchard CMS?

I've got to implement navigation using a main menu (easy) but then each menu will lead to a group of pages that have another "submenu" which I've implemented as a menu widget in the before content area.
The main navigation is something like this:
Home | First Group | Some page | Another page | Second Group | Yet another page
When the user clicks Home, Some page, Yet another page, it is taken directly to that page.
If the user clicks any of the "groups" it is taken to the "default page" for that group, and a submenu which is implemented as a menu widget is shown in the before content area. The first group can have 5 pages
Page 1.1 | Page 1.2 | Page 1.3 | Page 1.4 | etc.
The Second Group will have another set of pages.
I've naively set the path properties for the subpages so that they share a common path:
/group-1/page-1-1
/group-1/page-1-2
/group-2/page-1-3
etc.
/group-2/page-2-1
/group-2/page-3-1
etc.
I was expecting to use the Match Path to hide one widget menu in under one path or the other. But the problem is that I can't target a specific Menu or Widget, only content types in general, etc. I can't do something like this:
<Match Path="/group-1/*" ContentType="Widget SOME WAY TO TARGET A SPECIFIC WIDGET!!!">
<!-- SEND THE NEEDED PARTS TO OBLIVION SO THAT ONLY THE CORRECT MENU SHOWS HERE --!>
<Place Parts_Common_Body="-" />
</Match>
I believe that it would be much better to use a layer rule to target a specific path, but I just can't match a layer rule to something like url("/group-1/*"), so that's why I've tried to use the placement info which seems to be the wrong tool.
Is there a way I can extend the layer rules to work with regular expressions, for example? This way I can create really powerful layers and just layout my widgets on the proper layers.
In summary what I want is to have different submenus for different sections of the site. I'm just kind of lost on how to accomplish that, but layer rule seem to be the right tool, only if I could manage to use a little more powerful matching syntax.
I think I'm kind of blind!!!
Straight from the docs:
url("<url path>")
True if the current URL matches the specified path. If you add an asterisk (*) to the end of the path, all pages found in subfolders
under that path will evaluate to true (for example, url("~/home*")).
So adding this rule was enough to create a layer for an entire section of the site:
url("~/group-1*")
I'm almost ashamed of myself...

Custom theming Drupal 6 Menus

Is there a hook or preprocess function that I can access to write my own theming function for a drupal menu (in this case, primary links)?
I have a rather complex menu structure that requires a little extra markup than I'm currently getting by just rendering the menu items in a block (involving sub-menus with a little custom markup) and really need to get access to build the menu's content variable myself, ideally from an array that has all the primary links and their children in scope.
While it may not be the best solution, it is one that worked quite quickly and painlessly:
Drupal keeps a cached version of all your menus in the cache_menu table, I ran a this query to retreive a serialized string containing all the contents of the menu:
SELECT data FROM menu_cache WHERE serialized = 1 AND cid LIKE 'links:primary_links:%';
Substitute primary_links for whatever the name of your menu is and call unserialize on $row->data to get a structured array of everything you should need to build a custom menu.
I call a function in hook_preprocess_block that swaps the content of the menu block with my own and everything seems to be working fine.

How do I organise 3rd and 4th level navigation

I'm attempting to structure multiple levels of site navigation by using the "Modify Navigation" setting (Site Actions > Site Settings > Modify Navigation)
But it seems the UI on that page doesn't let me create pages which are children of other pages, or create folders which are children of other folders.
Basically, I need to create not just first level/second level nesting, but also 3rd and 4th level nesting of pages
I understand the parameters to so in the default.master to control if other levels are displayed, but I can't figure out how to create such a structure in sharepoint?
Am I completely missing the point?
Out of the box, there are no "sub-pages" in navigation in MOSS. The nested navigation which Heather Solomon describes in this article is about how you create multi-level navigation of a known site/subsite hierarchy.
If you need pages and sub-pages in your navigation, you will have to create a custom editor which allows you to define the needed hierarchy, as well as you will have to create a custom "navigation provider" which knows how to navigate the hierarchy.

Resources