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
I used the Umbraco.If() helper extensively in my templates. Nice shorthand way of switching rendered content or handling empty values.
Any suggestions for a quick replacement?
You could use a simple c# if statement instead such as
@if (singleColumn) { @Html.Raw("<div class='container'>"); } else { @Html.Raw("<div class='sub'>"); }
In Umbraco 9+ you can use Html.If() instead. Html is of type IHtmlHelper from asp.net core, and If() is implemented by Umbraco in the Umbraco.Extensions.HtmlHelperRenderExtensions class.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco 8: Umbraco.If Helper
I used the Umbraco.If() helper extensively in my templates. Nice shorthand way of switching rendered content or handling empty values.
Any suggestions for a quick replacement?
You could use a simple c# if statement instead such as
In Umbraco 9+ you can use Html.If() instead. Html is of type IHtmlHelper from asp.net core, and If() is implemented by Umbraco in the Umbraco.Extensions.HtmlHelperRenderExtensions class.
is working on a reply...