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
Scenario,: this code does not work without the dummy line:
@using umbraco.MacroEngines @{ var previous = Model.Previous(); var nextProduct = Model.Next(); } @if (previous != null || nextProduct != null) { <div id="prev-next"> @if (previous != null) { <a href="@previous.NiceUrl"> .. </a> } @if (nextProduct != null) { var dummy = nextProduct.Id; // this line fixes the bug <a href="@nextProduct.NiceUrl"> .. </a> } </div> }
Without the var dummy=... line the @nextProduct.NiceUrl returns #
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
DynamicNode.NiceUrl does not work sometimes
Scenario,: this code does not work without the dummy line:
@using umbraco.MacroEngines @{ var previous = Model.Previous(); var nextProduct = Model.Next(); } @if (previous != null || nextProduct != null) { <div id="prev-next"> @if (previous != null) { <a href="@previous.NiceUrl"> .. </a> } @if (nextProduct != null) { var dummy = nextProduct.Id; // this line fixes the bug <a href="@nextProduct.NiceUrl"> .. </a> } </div> }
Without the var dummy=... line the @nextProduct.NiceUrl returns #
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.