getting children of a particular document alias type
im trying to get the children of a certain document type to show sub navigation.
ive tried various code samples i found online but none of them work for me.
i start by checking for my document type and get the currentPage id but this doesnt seem to support currentPage.Children so how would i go about getting sub pages of this page id?
i essentially want the children at 1 level under document type ("Division") that are set to visible so i can get the name/url/image associated with these pages.....
if (@Model.Content.DocumentTypeAlias == "Division") { var currentPage = @Model.Content.Id;
// how do i loop thru this node to get the child pages?
getting children of a particular document alias type
im trying to get the children of a certain document type to show sub navigation.
ive tried various code samples i found online but none of them work for me.
i start by checking for my document type and get the currentPage id but this doesnt seem to support currentPage.Children so how would i go about getting sub pages of this page id?
i essentially want the children at 1 level under document type ("Division") that are set to visible so i can get the name/url/image associated with these pages.....
if (@Model.Content.DocumentTypeAlias == "Division")
{
var currentPage = @Model.Content.Id;
// how do i loop thru this node to get the child pages?
}
{
Model.Content.Children inside the if should return all child nodes.
thanksd this works ok now, i was trying to overcomplicate things....
how do i get he actual image url?
i have
<div><imgsrc="@child.GetPropertyValue("DivisionSliderImage")"/></div>
but the code is just showing the id number in the img tag.....
Something similar to this
Edited above
thanks
is working on a reply...