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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...