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
Anyone know if the StripHtml and Truncate methods have gone in V7?
Here is an example how you could use StripHtml and Truncate methods in Umbraco 7.
Hope this helps,
yep the bible razor Node cheat sheet needs updating.
So @library.Trancate is now @Umbraco.Truncate.
And a few others.
So if there is a truncate in the middle of an IMG tag, would this still strip the HTML or would we need to put in exceptions for the IMG tags and such.
Seems to have changed again in Umbraco 8. They're now HTML helper extensions.
@Umbraco.Truncate() is now @Html.Truncate()
For anyone else searching here for migrations of code to V8, it's a similar pattern for StripHtml. Looks like various text functions have moved from the bulging swiss army knife of UmbracoHelper into HtmlHelper, so
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted