Oct 18, 2013 at 9:34 AM
Edited Oct 18, 2013 at 9:35 AM
I want to display recent blog posts list differently from blog post summaries. I have followed Bertrands post from here :
and have seen discussion on Stack Overflow regarding what I want to achieve here:
but I'm none the wiser. I have probably started this from the wrong way, since I've overwritten placement.info to display recent blog posts in desired way:
while I should probably create alternates for each shape. Was trying to do it, but cannot get it to work. Can you please direct me to any other tutorials explaining this topic? If there are any?
I did manage to solve this problem. Don't think it's the most elegant solution, but at least it does the job for me. I followed approach from this post:
which I found the most useful of all. I created Parts.Blogs.RecentBlogPosts alternate, and while navigating through the model using shape tracing tool did manage to find all elements I was looking for. Could you please verify if it could be done in any simpler
@foreach (var item in Model.ContentItems.ContentItems.Items)
var max = (item.ContentItem.BodyPart.Text.Length > 100) ? 100 : item.ContentItem.BodyPart.Text.Length;
Mar 20, 2014 at 4:54 PM
Edited Mar 20, 2014 at 4:54 PM
This is perfect, thanks!
var max = (item.ContentItem.BodyPart.Text.Length > 100) ? 100 :
Obviously means the Text is cut off after 100 characters. How would I add an ellipsis after the 100th character?