I have a partial view that's pulling in some truncated text. It's stripping out the links (between the tags) within the text. I've tries a couple of things on the forum to try and get it work, but these seem to produce an error. Is there a more efficient way to do this? Here's the code...
Adding links to truncated text
Hi Folks,
I have a partial view that's pulling in some truncated text. It's stripping out the links (between the tags) within the text. I've tries a couple of things on the forum to try and get it work, but these seem to produce an error. Is there a more efficient way to do this? Here's the code...
Thanks for your help with this! Darren
Have you tried to use @Umbraco.StripHtml() before using .Truncate()?
See https://our.umbraco.org/documentation/Reference/Querying/UmbracoHelper/
--Dirk
Hi Dirk,
Thanks for the quick response!
I actually want the full link to appear with the truncated text - LINK TEXT for example rather than as it appears just now.
That's a great page you've recommended though - loads of good things on there!
Darren
is working on a reply...