In advanced templates, what code do I use to output an excerpt? And why the odd behavior?
I've switched to using advanced templates, and am currently using the following code on my home page to try to output an excerpt:
<$MTEntryExcerpt$>
This has yielded some unsavory results. Even though I have the excerpt field set to output 100 words, I'm getting very mixed results. Here are the problems I seem to be having:
- media, including photos and video are stripped, even on very short posts
- paragraph formatting is stripped entirely
- some posts having nothing except their title and footer info output
Most of these are a result of not creating an excerpt explicitly, but by relying on TypePad to create one based on the post body, but I think they still occur even if an excerpt is entered directly (I know the paragraph formatting being stripped still does). All of these issues go away (perhaps obviously) when I swap in <$MTEntryBody$> (and make no other changes).
So my questions are:
- is there some other tag I should be using to output the excerpt?
- why the (very, very) odd behavior? am I doing something wrong?
- it seems that basic templates may not have this same odd behavior, is that true?
<$MTEntryExcerpt$>
This has yielded some unsavory results. Even though I have the excerpt field set to output 100 words, I'm getting very mixed results. Here are the problems I seem to be having:
- media, including photos and video are stripped, even on very short posts
- paragraph formatting is stripped entirely
- some posts having nothing except their title and footer info output
Most of these are a result of not creating an excerpt explicitly, but by relying on TypePad to create one based on the post body, but I think they still occur even if an excerpt is entered directly (I know the paragraph formatting being stripped still does). All of these issues go away (perhaps obviously) when I swap in <$MTEntryBody$> (and make no other changes).
So my questions are:
- is there some other tag I should be using to output the excerpt?
- why the (very, very) odd behavior? am I doing something wrong?
- it seems that basic templates may not have this same odd behavior, is that true?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Hi Nate!
Although it does seem weird, this is the expected behavior. If the 100 characters cut off right in the middle of an image embed, for instance, that would really look bad! So, the excerpt just includes actual text, and not HTML code. If the post only contains HTML code (like a paragraph tag and then an embed from YouTube, for instance), there's no TEXT for the excerpt to show and therefore, it will be blank.
I hope that makes sense but let me know if not and I'll try to clarify further :)
Have you considered using an extended post instead of an excerpt?
1 person says
this answers the question
-
Inappropriate?Ha! The elusive "extended post". Not the most intuitive from a UI perspective (I had no idea it was there), but that will work perfectly. Thank you much!
I still find the excerpt rules confusing/annoying, but no need to use it now.
Thanks again!
I’m thankful
Loading Profile...



EMPLOYEE