I have parent node say 'story' and its chils nodes as 'story1', 'story2' and so on....
Now I have created following razor and have added this in 'Story' template which is applied to 'Story' Parent node. Also this template contains class such that 'Prev' & 'Next' arrows are shows and thus on clicking arrow, it shows prev and next child nodes content and heading.
<!-- start story --> @foreach(var item in Model.Children) { <div class="slide"> <h2 align="center">@item.PageHeading</h2> @item.content </div> } <!-- end story -->
this works fine when I run the parent page. But I want this same prev & next to work on each child node also. So how can I procced?
accessing same level nodes
hello...
I have parent node say 'story' and its chils nodes as 'story1', 'story2' and so on....
Now I have created following razor and have added this in 'Story' template which is applied to 'Story' Parent node. Also this template contains class such that 'Prev' & 'Next' arrows are shows and thus on clicking arrow, it shows prev and next child nodes content and heading.
<!-- start story -->
@foreach(var item in Model.Children)
{
<div class="slide">
<h2 align="center">@item.PageHeading</h2>
@item.content
</div>
}
<!-- end story -->
this works fine when I run the parent page. But I want this same prev & next to work on each child node also. So how can I procced?
How about:
Also refer to this blog post for more info: http://umbraco.com/follow-us/blog-archive/2011/3/13/umbraco-razor-feature-walkthrough-part-5
will chk out
is working on a reply...