Depth of naviagtion tree displayed on home page

Asked by ags on 2008-03-04

I am fairly new to silva so apologies if this is a trivial question:
I would like to know how to determine the depth of the navigation tree visible on the home page, e.g. I would the next 1-2 layers to be visible. Also currently the folder structure within a password protected section are visible.
Once one navigates into the first folders it is ok.

Setup is Silva 2.0 on Zope 2.10.5 Python 2.4.4 on RHEL5

many thanks

Andreas

Question information

Language:
English Edit question
Status:
Solved
For:
Silva Edit question
Assignee:
No assignee Edit question
Solved by:
Eric Casteleijn
Solved:
2008-03-07
Last query:
2008-03-07
Last reply:
2008-03-04
Best Eric Casteleijn (thisfred) said : #1

Hi,

it depends how you've actually set up your public layout. Silva doesn't really come with a predefined one like plone does. (Or, well, it does, but not one you'd want to use for anything but testing I think.)

Silva does provide a content type called an AutoTOC, which might be what you're using, in that case, add one with a "depth" property of 0, 1, or 2, whichever you prefer. Note that you can only change the depth by removing the AutoTOC and placing a new one with the new depth.

If you've built your own layout, you're probably calling get_public_tree() or get_public_tree_all() both of which support an optional depth argument, set to -1 (infinite) by default. Change that to get what you need.

I'm not sure what you mean by password protected. You can set the metadata field 'hide from tocs' for a piece of content or a subtree, so that it won't show up in navigation, but that doesn't mean it's not public, so if someone knows the url, they can still get there. (if you have restricted access to the folder to a certain logged in role, that *will* of course stop access for users who don't have that role.)

ags (agschatzlein) said : #2

Thanks thisfred, that solved my question.

ags (agschatzlein) said : #3

Actually just wanted to explain that the answer enabled me to dig for how the tree was put together in my site which made me realize that with SilvaLayout installed it was somewhat different but after some digging I was able to adjust the value in "tree.py". Many thanks for the swift reply.

Eric Casteleijn (thisfred) said : #4

Ok, cool. Let me add that there are two helpful but not super high traffic silva mailing lists here:

https://lists.infrae.com/mailman/listinfo/silva-general
https://lists.infrae.com/mailman/listinfo/silva-dev