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
Have another way to use this in Umbraco8? I got this line in Umbraco7 tutorial.
" @Umbraco.Truncate(news.newsBodyText, 100) "
I want to only show 200 words in my article on Parent page.
Umbraco.Truncate() is now Html.Truncate() in V8, so try using that instead.
Thanks Rhys! how to write other code?
(news.newsBodyText, 100) is not working
You'll need to either supply the appropriate Model or use .Value().
So, you could try something like:
foreach (News news in NewsList)
Where News is the name of your Model - this might be different for you.
In which case, your .Truncate() method would look like:
To put it all together, your code could look something like:
@foreach (News news in NewsList)
<div class="inner" style="width:100% !important">
<div class="image fit">
<img src="images/pic01.jpg" alt="" />
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted