Hi,
I've some pages stores within some folders.
When the navigation is generated those menu options representing the folders are clickable as every item in the navigation.
But since folders dont have any content to display those pages are empty.
Is it possible to generate the menu and set the URL to the folders to "#"?
Or do you have any other ideas?
Folders have no content to display, but you can change this behaviour slightly with paint layouts (3.6.x and above only).
Paint layouts override the normal output of an asset with something else. What you can do is create a paint layout and nest an asset listing with a dynamic root node of the current asset id. The paint layout then applies to the folder, overrides the output and shows the nested asset listing using the folder as the root node - then you can get the folder to show it's contents as a listing…
sorry if that's a little convoluted - hard to explain.
You can read more about paint layouts in User Manual Vol 2.
(your idea about using anchors as menu items won't work because you can't specify a different format for different asset types, only different levels in the heirarchy)
This is why we recommend not using folders in your navigation stream.
You can also set the folders to TYPE_2 links, so that they are supressed from the menus.
Wow that was fast.
I was just looking through the design_area_menu_type.inc to do some hack.
Thanks for the tip regarding Paint Layouts.
The problem is that nodes in the navigation structure aren't suppose to represent any content at all. They are only representing the category of its children.
[quote]Wow that was fast.
I was just looking through the design_area_menu_type.inc to do some hack.
Thanks for the tip regarding Paint Layouts.
The problem is that nodes in the navigation structure aren’t suppose to represent any content at all. They are only representing the category of its children.
[right][post=“8942”]<{POST_SNAPBACK}>[/post][/right][/quote]
I’m not sure I really understand your setup and the suggestions form Squiz re paint layout may be the best way to go about it but how about using a standard (blank or not) page as a node/folder?
Hi!
Solved this with a Javascript going thrue the navigation
Pseudo:
if(this.node has children) this.node.href = '#'But it would have been nice if it was implemented within the menu_normal script.
Um… this is implemented in the standard menu system. If you're supressing the link on any asset with children, why are you printing a URL in the menu in the first place? Just take the URL out completely from that level.
Remember, the menu system is just printing the HTML that you put in the <MySource_AREA> and <MySource_ASSET> tags. If you don't put an <a> tag in there, Matrix won't print one. 
Since I use folders as nodes I want the href for those to be just a # in the navigation.
This is how it looks:
As you can see there can be folders and content pages on the same level. In the navigation only the content pages are clickable. Folders are showing their children pages.
To resolve this issue I need use the script to change the href of those nodes having children. Or if the menu tag would let me to specify an override of the href for each node of a specific type, in my case folders.
[quote]To resolve this issue I need use the script to change the href of those nodes having children. Or if the menu tag would let me to specify an override of the href for each node of a specific type, in my case folders.
[right][post=“8966”]<{POST_SNAPBACK}>[/post][/right][/quote]
You should really look into Paint Layouts and Dynamic Root nodes for Asset Listings. That way, each of your folders can act like a asset listing for the contents within them and you won’t have to resort to JavaScript to suppress any links.
However, I also question the need to use quite so many folders within your actual website itself. Rather, you should look at moving that entire structure out of the site and linking in individual assets to create a proper navigation stream that again doesn’t require any manipulation.
The navigation includes all the assets in the same way as the the assets are placed within the the asset tree.
Nodes aren't supposed to show any content at all, not even listings of their children.
What do you mean about linking in assets? Do you mean that I should have a linked copy of the same struture within the site and keep the actual assets outside? Every page asset of the site can be reached from the navigation.
It's sort of a crossing between a site map and regular popup navigation.
I'm not the one who designed it. I just have the excellent job to implement it. <_<
[quote]Every page asset of the site can be reached from the navigation.
[right][post=“8968”]<{POST_SNAPBACK}>[/post][/right][/quote]
Yes, but you have all these folders all over the place as well, which is impacting on your navigation. Its seems counter-productive to create this massive hierarchy that has nothing to do with your navigation. If its for ease of editing, you can move all of that stuff out of the website itself, so that your authors can still use the structure to edit/add new pages. But, you then link in the actual page assets from the structure into the real website, creating the real navigation and hierarchy as you go.
Essentially, I’m trying to think of a way for you to keep the structure as you have it so that your authors are happy while also creating a self-navigating website so that you get all the benefits of having a CMS. 
Thanks for your response.
This is a preview of the site: http://test.dkit.se/mf/
Click on ‘Press’ and you se how the navigation is designed.
Its the exact same in the navigation as the within the asset tree.
Totaly there are about 550 pages within about 100 folders (or categories as those represent)
Woah, that's quite a navigation system.
Its also pretty Firefox-unfriendly: I seem to have a problem targetting the popup or other columns. The popup disappears before the mouse gets far enough left to trigger something, I think.
This is particularly obvious if I click the "Press" text – I cannot scroll to the right to the pop-up menu, it disappears! However, if I click the arrow next to the "Press" text, I am able to navigate into the pop-up.
Hope that helps!
Yepp…
Im aware of those problems. Thats an alpha version.
The site is going live on monday.