Help - Search - Members - Calendar
Full Version: How do i show only excerpt on home page?
Movable Type Community Forum > Additional Resources > Tips and Tricks
robainya
Can anyone tell me what i need to do to make only the "excerpt" text show up on the home page?

thanks!
LisaJill
Replace

CODE
<MTEntryBody>


with

CODE
<MTEntryExcerpt>


in your Main Index template (log in, manage weblog, click templates, click "Main Index Template")

does that help?
robainya
Yes! that worked. But now I don't know how to link it to the rest of the entry??

thanks!
LisaJill
In the default main index template, the time is the permalink to the main post. If you want it to be something else, you can move the surrounded a hrefs to wherever you want within the mtentries container....

thats not very exact, I know.. but does it get you started?
robainya
I'm pretty clueless. Here is what the code says (in the main index template):
CODE
<MTEntryExcerpt>
    
    <MTEntryIfExtended>
    <span class="extended">[URL=<$MTEntryPermalink$>#more]"[/URL]</span><br />
    </MTEntryIfExtended>

Can you tell me what i need to change?

EDITED to add CODE tags around code sample. smile.gif
LisaJill
you need to click the code button up above, THEN paste your code, then click it again - so I can see it. =)
robainya
See, i told you i'm clueless smile.gif

CODE
<MTEntryExcerpt>
    
    <MTEntryIfExtended>
    <span class="extended"><a href="<$MTEntryPermalink$>#more">Continue reading "<$MTEntryTitle$>"</a></span><br />
    </MTEntryIfExtended>
LisaJill
Ok, bear with me.

In your main index template, find MTEntries

copy from there down to /MTEntries (surrounded by greater and less than signs)

then put that in here using the code buttons.

and post what you would like to use as the link to the full article =)
robainya
Okay. Here it is:

CODE
<MTEntries>
<$MTEntryTrackbackData$>

    <MTDateHeader>
    <h2 class="date">
    <$MTEntryDate format="%x"$>
    </h2>
    </MTDateHeader>

    <div class="blogbody">
    
    <a name="<$MTEntryID pad="1"$>"></a>
    <h3 class="title"><$MTEntryTitle$></h3>
    
    
<MTEntryExcerpt>
    
    <MTEntryIfExtended>
    <span class="extended"><a href="<$MTEntryPermalink$>#more">Continue reading "<$MTEntryTitle$>"</a></span><br />
    </MTEntryIfExtended>
    
    <div class="posted">Posted by <$MTEntryAuthor$> at <a href="<$MTEntryPermalink$>"><$MTEntryDate format="%X"$></a>
    <MTEntryIfAllowComments>
    | <a href="<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false">Comments (<$MTEntryCommentCount$>)</a>
    </MTEntryIfAllowComments>
    <MTEntryIfAllowPings>
    | <a href="<$MTCGIPath$><$MTTrackbackScript$>?__mode=view&entry_id=<$MTEntryID$>" onclick="OpenTrackback(this.href); return false">TrackBack (<$MTEntryTrackbackCount$>)</a>
    </MTEntryIfAllowPings>
    </div>
    
    </div>
    


</MTEntries>


The full article is at:

CODE
<a href="http://www.paulsboutique.com/robin/archives/000014.html">
LisaJill
This code, in the posted by line, is what creates the link to the full article:

CODE
at <a href="<$MTEntryPermalink$>"><$MTEntryDate format="%X"$></a>


You can move the


CODE
<a href="<$MTEntryPermalink$>">...</a>


and replace ... with what you want to show as the link to the main article, if you want to change it....

does that help?
robainya
Yes!!! Thanks LisaJill!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.