Back to all blogs3 min read
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.
Ankush Jain
Lead Software Engineer (VP) | Software Architect
Published Nov 28, 2018Updated Nov 24, 2026
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>}