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 - Reset the Admin Password via SQL Server

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

Umbraco Macro for IFrame when Embedding Video, Vimeo Universal Player, or other types of IFrame on to a Page XSLT version and Razor Version