Leo's MovableType Tips

by Leo A. Notenboom

by Ask Leo!

Get between your Entry Body and Extended Entry

When you create a new entry in MT, you're presented with the default entry form that contains areas for both an Entry Body and an Extended Entry. Most folks use them for either of two purposes:

  1. The entry body is the "tease" portion of the entry that goes on to the home page, while the extended entry is the rest of the entry that shows up only on the entry's individual archive page.
  2. The entry body is what shows up in the RSS feed. The extended entry is the rest of the entry that shows up only on the entry's individual archive page.

As you can probably guess, those are really two instances of the same principal. And it's a principal I use on Ask Leo! quite successfully, for both RSS and the Ask Leo! home page.

The nice thing about having the article broken into two pieces like that is that you can insert something between the two pieces in your template. For example, the Ask Leo! individual entry archive contains this fragment:

<$MTEntryBody$>
<a name="more"></a>
<div id="entrygoogle">
  <!--#include VIRTUAL="googleads336x280.inc" -->
</div>
<p style="text-align:center">•</p>
<$MTEntryMore$>

In-between the <$MTEntryBody$> and the <$MTEntryMore$> tags, I've placed a <div> in which there's an include statement. As you might guess from the name, that include file contains my Google Adsense code which causes the ads to be displayed in the body of the entry, rather than before or after it. In fact the CSS style for ID "entrygoogle" allows me to further control positioning relative to this insertion point:

#entrygoogle
{
  background-color: #FFFFFF;
  float:right;
  padding-left:15px;
}

The "float" option allows the text of the article to wrap around the ad block.