Umbraco 7 Previous and Next Buttons

This snippet shows Previous and Next  buttons on a page in Umbraco 7

   <div class="nav-previous col-xs-6">
                                    @if(@CurrentPage.Previous() != null)
                                    <h4><a href="@CurrentPage.Previous().Url" rel="prev">PREVIOUS GALLERY</a></h4>
                                    <a href="@CurrentPage.Previous().Url" rel="prev"><span class="meta-nav">←</span> @CurrentPage.Previous().Name</a>
                                <div class="nav-next col-xs-6 pull-right">
                                    @if(@CurrentPage.Next() != null)
                                    <h4><a href="@CurrentPage.Next().Url" rel="next">NEXT GALLERY</a></h4>
                                    <a href="@CurrentPage.Next().Url" rel="next">@CurrentPage.Next().Name <span class="meta-nav">→</span></a>


Popular posts from this blog

Umbraco Razor Sort Nodes Ascending or Descending

Umbraco Razor get Querystring

Create a .NET Contact Form that Gets the Last Url Visited in C# Can also be Used in Umbraco