-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render menu starting at certain depth #145
Comments
No, currently no. Yet it was already proposed in some issue or even a pull request some time ago, if I'm not mistaken. There are some questions to answer before it could be implemented: 1. 3 or any other number basically says nothing to a person making a template?; 2. if a tree is restructured will it take to also update templates and swap one obscure number to another? Wouldn't it be more proper for your use case to try and use two different trees? |
Closing this. Feel free to reopen if any updates. |
Hi! I need this feature too, and I have a idea how to implement it. We can set 'breakpoint' on menu item and stop on it climbing up the tree from current item. According to example above:
We can set 'breakpoint' named 'example' on "A" and "B" items and get that we need in template calling {% sitetree_menu from "nav" breakpoint='example' %}. |
@vit-ivanov Looks somewhat unclear to me: why do you want to set two breakpoints. What if someone put four, six, etc.? Thta |
The goal is to start rendering
Possibly we can start rendering from certain level, but it looks like bad idea — it's not a solution for some menu configurations. Maybe russian? :))) skype, gtalk, icq etc |
Breakpoint is an additional field. |
Guess I got what you're up to. Need a couple of days to think that over, yet.
Possibly if I have some additional questions %) For now let's reopen the issue to not to forget. |
Seems interesting. Yet we probably should change Example: That's needs to be further analysed. |
I need to render a sites submenu which always starts with the tree items beginning with depth 3 (assuming that root is depth 1).
I do not see a way to do this with sitetree_menu(). this-siblings etc will not work in that case, as far as I understand it. What I would need is something like
{% sitetree_menu from "nav" include "trunk-depth-3" %}
Any way to do that?
To clarify - let's assume the tree looks like this:
Root
I need the tree to always start at the third level.
Soi if A1 is active, the menu would show:
A1
A2
If B1 OR B1A were active, the menu would be:
B1
-B1A
B2
ps: I realized I can do this with 2 custom templates that do not render anything for the first two levels, but that's really awkward.
The text was updated successfully, but these errors were encountered: