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>
<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
Post a Comment