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 following razor script. To navigate previous and next node and middle link to parent node. this is then inserted in every child node.
<div id="bottomNavigation" style="clear:both;"> <center>@{ if (@Model.Previous() != null) { <div> <a href="@Model.Previous().Url"> Previous</a></div> } else if(Model.Where("nodeTypeAlias == \"Treasure\"")) { <div> <a href="@Model.Parent.Url">Back To Akram Treasure</a></div> } if (@Model.Next() != null) { <div> <a href="@Model.Next().Url">Next</a></div> } }</center> </div>
the problem is that it is not showing Next link. It shows 'Previous' and 'Back To Akram Treasure' but why not showing 'Next'? If I remove code of 'Back To Akram Treasure' link then it shows Next link.
if I take code of next before back to Akram treasure then also it works. Any idea why not working? Everybody any clue?
Solved the problem...
used following code
if(@Model.NodeTypeAlias=="Treasure") { <div><a href="@Model.Parent.NiceUrl">Back To Akram Treasure</a></div> }
instead of previous one
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Next link not showing
I have following razor script. To navigate previous and next node and middle link to parent node. this is then inserted in every child node.
the problem is that it is not showing Next link. It shows 'Previous' and 'Back To Akram Treasure' but why not showing 'Next'? If I remove code of 'Back To Akram Treasure' link then it shows Next link.
if I take code of next before back to Akram treasure then also it works. Any idea why not working? Everybody any clue?
Solved the problem...
used following code
if(@Model.NodeTypeAlias=="Treasure")
{
<div><a href="@Model.Parent.NiceUrl">Back To Akram Treasure</a></div>
}
instead of previous one
is working on a reply...