Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
I'm trying to build a navigation between nodes from the same documenttype.
@if (@CurrentPage.Where("NodeTypeAlias == \"Nieuwsitem\"").Previous() != null) { <a href="@CurrentPage.Where("NodeTypeAlias == \"Nieuwsitem\"").Previous().Url">Previous</a> }
This is not working.
bool' does not contain a definition for 'Previous
What am i doing wrong?
Here's how I do previous and next links for a given docType alias, which might help:
string alias = "Nieuwsitem"; // your docType alias var previousPage = Model.Content.Previous(); var nextPage = Model.Content.Next(); if ((previousPage != null && previousPage.DocumentTypeAlias == alias) || (nextPage != null && nextPage.DocumentTypeAlias == alias)) { <ul class="pager"> @if (previousPage != null && previousPage.DocumentTypeAlias == alias) { <li class="previous"> <a href="@previousPage.Url#main" class="prev" rel="prev" title="@previousPage.Name"> <i class="fa fa-angle-left"></i> Previous</a> </li> } @if (nextPage != null && nextPage.DocumentTypeAlias == alias) { <li class="next"> <a href="@nextPage.Url#main" class="next" rel="next" title="@nextPage.Name"> Next <i class="fa fa-angle-right"></i></a> </li> } </ul> }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Navigation between nodes of documenttype
Hi All,
I'm trying to build a navigation between nodes from the same documenttype.
This is not working.
bool' does not contain a definition for 'Previous
What am i doing wrong?
Here's how I do previous and next links for a given docType alias, which might help:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.