Michael Franzl
2008-Aug-23 10:58 UTC
[webgen-users] How to exclude directories from the menu?
I''ve discovered by testing that ''in_menu'' is set to ''false'' by default and works only for .page files. Directories containing page files are included in the menu only if at least one of its .page files has ''in_menu'' set to ''true''. I hope that is correct. How can directories be selectively excluded from the menu, independent of their contents and without removing them?
Thomas Leitner
2008-Aug-23 15:01 UTC
[webgen-users] How to exclude directories from the menu?
Am Sat, 23 Aug 2008 12:58:52 +0200 schrieb Michael Franzl <m.franzl at aon.at>:> I''ve discovered by testing that ''in_menu'' is set to ''false'' by > default and works only for .page files. Directories containing page > files are included in the menu only if at least one of its .page > files has ''in_menu'' set to ''true''. I hope that is correct.The meta information `in_menu` works for anything, not only page files and is `false` by default. Directories are included in a menu if a) one of their descendents is in the menu OR b) if `in_menu` is set to `true` for them.> How can directories be selectively excluded from the menu, > independent of their contents and without removing them?So you want to exclude a directory from the menu even if some of its children (or their children or ...) are in the menu? That''s currently not possible but may be made possible by modifying the menu tag... -- Thomas
Thomas Leitner
2008-Aug-24 07:08 UTC
[webgen-users] How to exclude directories from the menu?
Am Sun, 24 Aug 2008 01:49:15 +0200 schrieb Michael Franzl <m.franzl at aon.at>:> > So you want to exclude a directory from the menu even if some of its > > children (or their children or ...) are in the menu? That''s > > currently not possible but may be made possible by modifying the > > menu tag... > > > Correct. That may sound nonsensical at first, but let me illustrate > with an example: > > Imagine doing a glossary. There are short articles, explaining terms. > Articles exist as .page files in the src/glossary/ folder. The > articles are assigned thematic categories, which have its own folders > in src/glossary/. Copies of articles which belong to a category > reside in the respective folders. The index.html files of the > category folders display the respective contents. The main index.html > file of the glossary should display an (alphabetical) menu of *just* > the articles (not the categories/folders). The logic behind this is, > that the categories get a nice custom navigation via icons. > > I think this is a rather special application of the menu, but, > generally speaking, implementing an optional overriding `in_menu` for > folders would make the use of the menu more flexible, while not > having any backwards compatibility quirks. > > What do you think?Yeah, it definitely has its use cases. But I have to think a little bit more about this before providing a viable solution. Will come back to you! -- Thomas