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.
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
StripHtml and Truncate gone in V7?
Anyone know if the StripHtml and Truncate methods have gone in V7?
Hi John,
Here is an example how you could use StripHtml and Truncate methods in Umbraco 7.
Truncate:
StripHtml
Hope this helps,
/Dennis
Thanks Dennis!
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 now
is working on a reply...