Subdirectory page level in v1.0.0

45 views
Skip to first unread message

cdwer...@gmail.com

unread,
Dec 5, 2013, 1:46:24 AM12/5/13
to webgen...@googlegroups.com
Hi Thomas!

Please consider this webgen tree:

/
  about.en.html
  default.template
  index.en.html
  subdir1/
    another.en.html
    index.en.html
  templates/
    tag.template
    

I'd like to display a menu containing all items on level 1 and the "index" pages of each subdirectory on level 2, e.g.:

about
index
subdir1

This was the menu I got in webgen 0.5. However in webgen 1.0.0 when I use this menu definition on the "about" page:

{menu: {options: {mi: {in_menu: true}, sort: true, siblings: [0,-1]}}}

I get to see the menu:

about
index

subdir1 is missing because it is on level 2 and is not a sibling of the items on level 1. When using

{menu: {options: {mi: {in_menu: true}, sort: true}}}

I get the menu:

Subdir1
  another
  index
about
index

But that's not what I want either. The items below subdir1 should only show up in the menu of pages in that subdir. Last attempt:

{menu: {options: {sort: true, siblings: [0,-1]}}}

/
    Default
    Images
    Stylesheets
    Subdir1
    Templates
    about
    index
    
What am I doing wrong?

Thank you!
Kind regards,

Christoph Dwertmann

Thomas Leitner

unread,
Dec 5, 2013, 4:32:38 AM12/5/13
to webgen...@rubyforge.org
Hi Christoph,

On 2013-12-04 22:46 -0800 cdwer...@gmail.com wrote:
> about
> index
> subdir1
>
> This was the menu I got in webgen 0.5. However in webgen 1.0.0 when I
> use this menu definition on the "about" page:
>
> {menu: {options: {mi: {in_menu: true}, sort: true, siblings: [0,-1]}}}

You need to make sure that the directories themselves are in the menu
by setting the in_menu meta information key (that is used in the menu
options above).

Use a meta information file `src/my.metainfo` with the following
content:

--- alcn
subdir1/:
in_menu: true

Best regards,
Thomas
_______________________________________________
webgen-users mailing list
webgen...@rubyforge.org
http://rubyforge.org/mailman/listinfo/webgen-users

Christoph Dwertmann

unread,
Dec 5, 2013, 5:45:48 AM12/5/13
to webgen...@googlegroups.com, webgen...@rubyforge.org
Excellent, thanks Thomas, that did the trick.

Cheers,

Christoph
> --
>
> ---
> You received this message because you are subscribed to a topic in the Google Groups "webgen-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/webgen-users/W7NUHIkGi5U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to webgen-users...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages