This weblog is no longer being maintained. All information here has been ported to EclecticEchoes.com. This site (heupel.com/eclectic) remains only for archival purposes.

January 23, 2004

MT-Preview absolutely rocks, but....

Laurent Mihalkovic (big thanks!) has come out with a great plug-in that has taken care of a nagging annoyance in MovableType for me—no way to preview an entry with the template and style sheets that will be used when it is actually viewed by visitors.  MT-Preview now adds another button to the “new entry” / “edit entry” page for a WYSIWYG preview of the entry—using the individual archive template. Works like a charm. Of course…

He also added a great tag, <MTEntryIfPreviewMode>, to act as a selector switch for things you want only to specifically show in WYSIWYG preview but not on the live site. So you can for instance add:

<MTEntryIfPreviewMode>
     <div style="font: 700 1.5em sans-serif;color:Red;"> Currently viewing in preview mode</div>
</MTEntryIfPreviewMode>

to your Individual archive Template in MT. When previewing an entry you get the warning message (in bolder red etc) but when it is published those tags are ignored in the build process and the page appears without the warning. Great!

Unfortunately it appears—from my feeble attempts at least—that <MTElse>, <MTEntryIfPreviewMode> and MT-Speling do not work together. I tried to add the MT-Speling plugin to the WYSIWYG preview window using:

<MTEntryIfPreviewMode>
    <$MTEntryBody apply_macros="1" check_spelling="1"$>
    <span id="more"></span>
    <$MTEntryMore apply_macros="1" check_spelling="1"$>
<MTElse>
    <$MTEntryBody apply_macros="1"$>
    <span id="more"></span>
    <$MTEntryMore apply_macros="1"$>
</MTElse>
</MTEntryIfPreviewMode>

The preview page looks exactly as I wanted it to, it has the MT-Speling marked entry and extended entry followed a check-box and suggested spelling corrections, with the check-box to turn on or off the MT-Speling visuals. Unfortunately the published site version, well… it’s sort of missing a body and extended entry. It seem to hit the <MTEntryIfPreviewMode> tag, determine that it isn’t in preview mode and skip right to the line following the </MTEntryIfPreviewMode> tag.

Right now this entry will be a bit of a mystery to anyone who looks at it on the individual archive page, but I’m going to leave it this way for a day or two…

To make the plug-in work with the <MTElse> or provide it’s own else type tag would make this great plug-in even better.

Posted by Eric at January 23, 2004 11:37 PM | TrackBack
Comments & Trackbacks
Read nude teens in public pic of the day
Weblog:
fantasy fest public orgy flashing button