roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: display content of an entry
Date Thu, 29 Nov 2007 22:49:01 GMT
On Nov 29, 2007 6:03 AM, Odelya Glick <odelya@jpost.com> wrote:
> I don't understand how does the $entry.displayContent works -
> I shows the summery, and then [read more] or the whole page.
> Where can I change the display content format?

The $entry.displayContent is designed for blogs that want to do these things:
1) use both a summary and a content for each blog post.
2) show the summary on the blog's main page and the content on the
entry's permalink page

As the template guide says:

   public String getDisplayContent(String readMoreLink)
   If you pass in a non-null and non-empty entry permalink, then this
method will
   return the transformed summary of the entry, or the text if there
is no summary.

For example, in the day template of my blog, I have this logic:

        <div class="entryContent">
            #if($model.permalink)
                $entry.displayContent
            #else
                $entry.displayContent($url.entry($entry.anchor))
            #end
        </div>

Basically, displayContent just decides whether to call
$entry.transformedText or $entry.transformedSummary.

If you want to come up with your own logic for how to display summary
and content, then you use the $entry.transforedText and/or
$entry.transformedSummary to get the entry content and summary
respectively. The name "transformed" means that the entry text/summary
is passed through any weblog entry plugins that are associated with
the entry.

Hope that helps...

- Dave

Mime
View raw message