user-pic

How do a format excerpts?

Vote 0 Votes

The links, paragraphing, and other formatting from my posts are stripped from the excerpts. How can I have the excerpts keep the formatting?

Reported on Movable Type 4.2

11 Replies

| Add a Reply
  • Can you post a link please?

  • Sorry, yes. It is:

    www.legalprojectmanagement.info

  • You need to make sure the correct text filters are applied to the excerpts see http://www.movabletype.org/documentation/appendices/modifiers/filters.html

  • Dear Peaston,

    In other words you will need to replace:

    <mt:Excerpt>

    with:

    <mt:Excerpt convert_breaks="1">

    Kind Regards,
    Mihai Bocsaru

  • I already have convert_breaks set to "1". Here is my "Entry Summary" template. Can anyone tell me what it isn't working?

    <$mt:EntryTrackbackData$>
    <div id="entry-<$mt:EntryID$>" class="entry-asset asset hentry">
        <div class="asset-header">
            <h2 class="asset-name entry-title"><a href="<$mt:EntryPermalink$>" rel="bookmark"><$mt:EntryTitle$></a></h2>
            <div class="asset-meta">
                <span class="byline">
        <mt:If tag="EntryAuthorDisplayName">
                    By <span class="vcard author"><$mt:EntryAuthorLink show_hcard="1"$></span> on <abbr class="published" title="<$mt:EntryDate format_name="iso8601"$>"><$mt:EntryDate format="%x %X"$></abbr>
        <mt:Else>
                    <abbr class="published" title="<$mt:EntryDate format_name="iso8601"$>"><$mt:EntryDate format="%x %X"$></abbr>
        </mt:If>
                </span>
    <mt:Unless name="hide_counts" eq="1">
                <mt:IfCommentsActive><span class="separator">|</span> <a href="<$mt:EntryPermalink$>#comments"><$mt:EntryCommentCount singular="1 Comment" plural="# Comments" none="No Comments"$></a></mt:IfCommentsActive>
                <mt:IfPingsActive><span class="separator">|</span> <a href="<$mt:EntryPermalink$>#trackbacks"><$mt:EntryTrackbackCount singular="1 TrackBack" plural="# TrackBacks" none="No TrackBacks"$></a></mt:IfPingsActive>
    </mt:Unless>
            </div>
        </div>
        <div class="asset-content entry-content">
    <mt:If tag="EntryBody">
            <div class="asset-body">
                <mt:EntryExcerpt convert_breaks="1">
    <BR><BR>
    <div class="asset-more-link">
                Continue reading <a href="<$mt:EntryPermalink$>#more" rel="bookmark"><$mt:EntryTitle$></a>.
            </div>
            </div>
    </mt:If>
    <mt:If name="entry_archive">
        <mt:EntryIfTagged>
            <div class="entry-tags">
                <h4>Tags<span class="delimiter">:</span></h4>
                <ul>
                    <li><mt:EntryTags glue='<span class="delimiter">,</span></li> <li>'><a href="javascript:void(0)" onclick="location.href='<$mt:TagSearchLink encode_js="1"$>';return false;" rel="tag"><$mt:TagName$></a></mt:EntryTags></li>
                </ul>
            </div>
        </mt:EntryIfTagged>
    </mt:If>
    <mt:If tag="EntryMore" convert_breaks="0">
            <div class="asset-more-link">
                Continue reading <a href="<$mt:EntryPermalink$>#more" rel="bookmark"><$mt:EntryTitle$></a>.
            </div>
    </mt:If>
        </div>
        <div class="asset-footer"></div>
    </div>
    
  • Actually, I recall from experience that indeed the formatting was lost when I've used EntryExcerpt even when adding that formatting setting.

    Are you entering custom information on this Excerpt field, or is it just that you want the first 40 (or maybe different number) of words from EntryBody?

    You may like to experiment with:

    <mt:EntryBody words="40">

    And see what results you get!

    Also, it would be good if you can provide me a sample of an Excerpt with the formatting coding that you would like to get.

    Doing that I could experiment a little bit for you.

  • Thanks Mihai. I've configured it to automatically create the excerpts using the first 100 words.

  • I've tried Mihai's way of "mt:EntryBody words="40"", it doesn't work either.

  • You're welcome Peaston!

    Baiyan, please provide me a direct URL to your blog and I will check.

  • Mihai,

    If you look at Peaston's blog, his problem has't solved yet, in almost half a year:

    http://www.legalprojectmanagement.info/

    His blog is of English, would you please take a look if there is anything wrong?

    -Baiyan

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012