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 7 - C# Razor - Passing a parameter variable from a Template to a Partial View.

Umbraco 7 Hide a page from Navigation or Sub Navigation with umbracoNaviHide using Razor in a template or partial view

Umbraco Razor Sort Nodes Ascending or Descending