Formatting MTEntryKeywords, MTEntryExcerpt with Markdown
Jacob Patton
patton at freetheslaves.net
Wed Feb 2 13:31:10 EST 2005
Hi,
I'm following Brad Choate's instructions (http://tinyurl.com/42cr8) for
using Movable Type with Smarty templates, and I've run into some
difficulty formatting the MT keywords and excerpts with Markdown.
Hopefully somebody here can help.
The trouble lies in the "Entry to PHP Hash" template module which
populates an array with all of the MT variables. I'm using Markdown
and SmartyPants to format the post entries, and that seems to work, but
I can't for the life of me get the module to format the keywords and
excerpt fields.
Here's the offending section of code:
// Begin code
$entry['keywords'] = <<<KEYWORDS
<$MTEntryKeywords encode_php="heredoc" $>
KEYWORDS;
$entry['excerpt'] = <<<EXCERPT
<$MTEntryExcerpt encode_php="heredoc" $>
EXCERPT;
// End code
As you can see, I've encoded the variables with MT's heredoc syntax to
avoid any problems with unescaped quotes, but of course this doesn't
take care of smartening up the quotes or marking up the fields with
XHTML.
What I'd rather do is this:
// Begin code
<MTMarkdownOptions>
$entry['keywords'] = '<$MTEntryKeywords$>';
$entry['excerpt'] = '<$MTEntryExcerpt$>';
</MTMarkdownOptions>
// End code
But it doesn't seem to work.
Does anyone know how to format these variables with Markdown and
SmartyPants?
Thanks very much,
Jacob Patton
Director of Outreach and Technology
Free the Slaves
1326 14th St. NW
Washington, DC 20005
Ph: 202-588-1865 or 1-866-324-FREE
Fax: 202-588-1514
www.freetheslaves.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1567 bytes
Desc: not available
Url : http://six.pairlist.net/pipermail/markdown-discuss/attachments/20050202/2fbed227/attachment.bin
More information about the Markdown-Discuss
mailing list