librelist archives

« back to archive

Nested menu level

Nested menu level

From:
Δημήτρης Τσιμπίδης
Date:
2012-04-03 @ 10:31
Hello,

I just created my first nesta site, and i'm a bit confused.
I'm trying to increase the nested menu depth from 2 (default) to 3.
i have a content/menu.txt file. Do I have to use something like
"-*display_menu(Nesta::Menu.for_path('/docs'), :class => "menu",
:levels => 3)"
* or "- display_menu(Nesta::Menu.full_menu)" ?
and, if yes, where am I supposed to put it? (in what file?)
Is there any other documentation, except the one in http://nestacms.com/docs
?

Thank you,
Dimitris.

Re: [nesta] Nested menu level

From:
Jake Subs
Date:
2012-04-03 @ 10:36
2012/4/3 Δημήτρης Τσιμπίδης <tsimpidisd@gmail.com>:
> I'm trying to increase the nested menu depth from 2 (default) to 3.

According to http://nestacms.com/docs/creating-content/menus:

> each sub level is indented by two spaces.

So simply indent the menu items 3 deep by four spaces.

hth, Jake

-- 
[~] Jake Rayson
[w] www.jrayson.co.uk
[e] subs@growdigital.org
[t] @growdigital

Re: [nesta] Nested menu level

From:
Graham Ashton
Date:
2012-04-03 @ 11:25
On 3 Apr 2012, at 11:36, Jake Subs wrote:

>> each sub level is indented by two spaces.
> 
> So simply indent the menu items 3 deep by four spaces.

Correct.

He's using the default theme (we chatted on IRC) which means he also needs
to make a copy of the default categories.haml file, and edit it to change 
the default value of levels:

mkdir views
cp $(bundle show nesta)/views/categories.haml views

And then you need to add your own CSS to style the nested lists, as the 
default style's CSS doesn't cover it.