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 Team, I was working on a Umbraco 8 project and I have migrated to Umbraco 10. There are many templates with @helper function which seems no longer supported. Is there any alternative for that? Regards
@helper
Hi Arun
In .NET Core the previous know @helper is just razor functions. https://www.mikesdotnetting.com/article/344/what-happened-to-helpers-in-asp-net-core
For example:
@helper RenderList(IEnumerable<string> items, string style){ <ul> @foreach(var item in items) { <li class="@style">@item</li> } </ul> }
which would now be written as:
@{ void RenderList(IEnumerable<string> items, string style) { <ul> foreach (var item in items) { <li class="@style">@item</li> } </ul> } }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Helper function in Umbraco 9+
Hi Team,
I was working on a Umbraco 8 project and I have migrated to Umbraco 10.
There are many templates with
@helper
function which seems no longer supported.Is there any alternative for that?
Regards
Hi Arun
In .NET Core the previous know
@helper
is just razor functions. https://www.mikesdotnetting.com/article/344/what-happened-to-helpers-in-asp-net-coreFor example:
which would now be written as:
is working on a reply...