Hi, I''m currently in the process of switching from my previous web page management tool (by coincidence also called "webgen" ;-) to webgen-0.5 and stumbled upon a problem regarding the definition of menus, which I can not resolve either by the online documentation or the previous posts in the different groups (maybe it is a too trivial question?) I want to define a standard menu, e.g. EntryA EntryB ~~SubEntryB.1 ~~SubEntryB.2 EntryC ~~SubEntryC.1 ~~SubEntryC.2 Hence, I have the corresponding file system hierarchy EntryA.page EntryB/ EntryB/SubEntryB.1 ... EntryC/ EntryC/SubEntryC.2 ... And all is fine. Except, and here comes the problem, when I try to change the menu links of the top level entries such that the directly link to a sub entry instead of the default "index.html", e.g. clicking on EntryB in the menu should open EntryB/SubEntryB.1.html. By using virtual entries for the top level entries I can have that behaviour, but I can not deactivate the menu entry for the directory itself ("in_menu: false" does not work). As soon as one of the sub entries has "in_menu: true", the top level entry appears in the menu. I''ve tried different settings for "{menu: }" but either used the wrong switch or this is not possible. Furthermore, the menu structure is destroyed by this, i.e. the virtual entry is not the parent of the sub entries. In the documentation static menus are mentioned, but I can not find any information about defining relations between menu items. My current fix for the problem is having a "index.html" instead of a "index.page" in each sub directory and putting an automatic redirection to the right web page. But I consider this a hack not a real solution. So my question: how can I change to default definition of the link for directories, e.g. replace "index.html" by "SubEntryB.1.html" in the meta information of EntryB, or how can I define the menu hierarchy for virtual entries, e.g. VirtualEntryB is parent of SubEntryB.1, and prevent appearing the directory entry EntryB in my menu? RGDS Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 4262 bytes Desc: not available URL: <http://rubyforge.org/pipermail/webgen-users/attachments/20110210/f322be1a/attachment-0001.bin>
On 2011-02-10 21:14 +0100 Ronald Kriemann wrote:> Hi, > > I''m currently in the process of switching from my previous web page > management tool (by coincidence also called "webgen" ;-) to webgen-0.5 > and stumbled upon a problem regarding the definition of menus, which > I can not resolve either by the online documentation or the previous > posts in the different groups (maybe it is a too trivial question?) > > I want to define a standard menu, e.g. > > EntryA > EntryB > ~~SubEntryB.1 > ~~SubEntryB.2 > EntryC > ~~SubEntryC.1 > ~~SubEntryC.2 > > Hence, I have the corresponding file system hierarchy > > EntryA.page > EntryB/ > EntryB/SubEntryB.1 > ... > EntryC/ > EntryC/SubEntryC.2 > ... > > And all is fine. Except, and here comes the problem, when I try to > change the menu links of the top level entries such that the directly > link to a sub entry instead of the default "index.html", e.g. > clicking on EntryB in the menu should open EntryB/SubEntryB.1.html. > > By using virtual entries for the top level entries I can have that > behaviour, but I can not deactivate the menu entry for the directory > itself ("in_menu: false" does not work). As soon as one of the sub > entries has "in_menu: true", the top level entry appears in the menu. > I''ve tried different settings for "{menu: }" but either used the > wrong switch or this is not possible. Furthermore, the menu structure > is destroyed by this, i.e. the virtual entry is not the parent of the > sub entries. In the documentation static menus are mentioned, but I > can not find any information about defining relations between menu > items. > > My current fix for the problem is having a "index.html" instead of > a "index.page" in each sub directory and putting an automatic > redirection to the right web page. But I consider this a hack not a > real solution. > > So my question: how can I change to default definition of the link > for directories, e.g. replace "index.html" by "SubEntryB.1.html" in > the meta information of EntryB, or how can I define the menu > hierarchy for virtual entries, e.g. VirtualEntryB is parent of > SubEntryB.1, and prevent appearing the directory entry EntryB in my > menu?Have a look at the documentation for the meta information `index_path`. It allows you to define the target page that is used when linking to a directory - exactly want you want! Just use a meta information file for setting it, eg. create a file `src/metainfo` and put the following into it: --- name:alcn /EntryB/: index_path: SubEntryB.1.html in_menu: true /EntryC/: index_path: SubEntryC.1.html in_menu: true Best regards, Thomas
> --- name:alcn > /EntryB/: > index_path: SubEntryB.1.html > in_menu: true > > /EntryC/: > index_path: SubEntryC.1.html > in_menu: trueI''ve tried /EntryB/: index_path: EntryB/SubEntryB.1.html which had no effect, e.g. still "index.html" was used, but obviously, the link is already within the subdirectory. Thank you very much for the help. RGDS Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 4262 bytes Desc: not available URL: <http://rubyforge.org/pipermail/webgen-users/attachments/20110217/ec5276a1/attachment.bin>