CoderJony

Get Previous and Next page URLs in Umbraco

To get previous & next page URLs in Umbraco, you can use the below piece of code in your razor view.

@if(CurrentPage.Previous() != null){
       <a href="@CurrentPage.Previous().Url">Previous</a>
}
	
@if(CurrentPage.Next() != null){
       <a href="@CurrentPage.Next().Url">Next</a>
}
Buy Me A Coffee