Umbraco Razor Display Links to Next, Previous and Parent page or node
The Following Razor code for Umbraco displays Next and Previous Buttons / Links and a Return to the Parent node Button / Link: Example 1: <umbraco:Macro runat="server" language="cshtml"> @{ if (@Model.Previous() != null) { <a href="@Model.Previous().Url">Previous Image</a> } var currentPg = Model; <a href="@currentPg.Parent.Url">View all @currentPg.Parent.Name</a> if (@Model.Next() != null) { <a href="@Model.Next().Url">Next Image</a> } } </umbraco:Macro> Example 2: This Example shows you how to ignore pages that are hidden from the navigation in Umbraco. @{ if (@Model.Previous() != null) { var node = Model.Previous(); if (node.Visible) { <a class="button green" href="@Model.Previous().Url">@Model.Previous().PageTitle Images</a> }