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>
                                   
                               
                                <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>
                                    }
                                </div>

Comments

Popular posts from this blog

Umbraco 7 - C# Razor - Passing a parameter variable from a Template to a Partial View.

Umbraco Razor Sort Nodes Ascending or Descending

Umbraco - Reset the Admin Password via SQL Server