Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kevin 37 posts 57 karma points
    Apr 17, 2010 @ 21:07
    Kevin
    0

    How can blog show abstract content?

    Generally in the browse page blog posts are showed in abstract, but the Blog 4 of the Umbraco show everything of blog posts in the browse page. Does anybody know how to show abstract content in the browse page of Blog 4?

    Thanks advance.

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Apr 17, 2010 @ 23:03
    Morten Bock
    0

    This is a common scenario that usually requires some thought in what exactly you want to achieve. The typical approaches are:

    1: Strip the html tags, and truncate the text. Is automatic, but looses images/formating and so on

    http://our.umbraco.org/forum/developers/xslt/6522-News-teaser-

    2: Create a separate teaser field that is populated manually. Lots of control, but no automation

    3: Create a more intelligent truncating function that includes the first x paragraphs, oo similar.

    4: Insert some sort of marker in your text (maybe add a <p class="break"> to the 3rd paragraph) to mark where to break, and the split the text when that marker is hit. 

    Lots of options, but depends on what you want to do.

  • Kevin 37 posts 57 karma points
    Apr 17, 2010 @ 23:59
    Kevin
    0

    HI Morten, thanks for your reply. The second option is good for me. I created a new property in the Tab: Content named AbstractText, but will this slow down the Blog List Posts? I am concerning this because the Blog List page and the Blog post page will both retrieve the bodytext and the abstract text.

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Apr 19, 2010 @ 05:45
    Morten Bock
    0

    No, it will not have any performance effects. Everything is cached in memory, and loaded lightning fast.

Please Sign in or register to post replies

Write your reply to:

Draft