Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
i have a megu menu working fine from the top level of the site but cannot seem to create an equivalent menu 4 levels down...
i assumed it would be as easy as setting the start page at the right level or document type
where i had -
var homePage = @Model.Content.AncestorsOrSelf(1).First();
i have tried
var homePage = @Model.Content.AncestorsOrSelf(4).First();
var homePage = @Model.Content.AncestorOrSelf("Stream");
var homePage = @Model.Content.Descendants(4).first();
but none seem to work...
or am i better starting at the homepage and checking for the right level within the forweach loop?
@foreach (var page in homePage.AncestorOrSelf(1).Children.Where("Visible"))
how would i add another check here for document type alais or level ?
If you want the first level 4 node going up the tree from the node being rendered then this is fine?
var homePage = Model.Content.AncestorOrSelf(4);
Perhaps a screen shot of you expanded tree would help us understand your issue....?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
creating dynamic menu from a certain level
i have a megu menu working fine from the top level of the site but cannot seem to create an equivalent menu 4 levels down...
i assumed it would be as easy as setting the start page at the right level or document type
where i had -
var homePage = @Model.Content.AncestorsOrSelf(1).First();
i have tried
var homePage = @Model.Content.AncestorsOrSelf(4).First();
var homePage = @Model.Content.AncestorOrSelf("Stream");
var homePage = @Model.Content.Descendants(4).first();
but none seem to work...
or am i better starting at the homepage and checking for the right level within the forweach loop?
@foreach (var page in homePage.AncestorOrSelf(1).Children.Where("Visible"))
how would i add another check here for document type alais or level ?
If you want the first level 4 node going up the tree from the node being rendered then this is fine?
Perhaps a screen shot of you expanded tree would help us understand your issue....?
is working on a reply...