About Jamie on Software

Jamie on Software is the online journal of web developer and writer Jamie Rumbelow.

Jamie likes books, guitars, programming, open source and food. He writes about these things too. This is where he puts the things he writes.

Tags
Tweets
Feeds
We Love
Powered by Squarespace
Monday
Mar282011

New in MojoBlog 2.1 - {excerpt}

I have received an immensely high number of requests from users of my popular MojoBlog add-on to add an {excerpt} variable; to allow users to display a short, configurable excerpt of each blog entry's content.

As of MojoBlog 2.1, released last week, you can now use the {excerpt} tag along with the excerpt_words="" parameter to control and display your entry's excerpts. Here's an example of it in use.

{mojo:blog:entries excerpt_words="20"}
    {entries}
        <h2>{title}</h2>
        <p>{excerpt}</p>
        <p><a href="{url_title_path}">Read More</a></p>
    {/entries}
{/mojo:blog:entries}

The previous will display a list of all entry titles and excerpts (chopping off the content at 20 words), along with a Read More link. As always, do check out the documentation to see what else MojoBlog can do.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>