Page 1 of 1

Smarty Markdown modifier

Posted: Tue Apr 12, 2005 6:09 pm
by evets
I installed Markdown as a Smarty modifier. 

The only way I could find to use it (in a template) was to capture the content and pass it to the modifier.

Code: Select all

{capture name=stuff}{content}{/capture}{$smarty.capture.stuff|markdown}
Any other ideas?

Re: Smarty Markdown modifier

Posted: Tue Apr 12, 2005 6:42 pm
by Ted
A nice way to do it would be to make it a module (using the actual markdown code) and hook it into the ContentData function.  This way you could pass content through Markdown when it's pulled from the database, but before it's pasted into the template.  Caching would work correctly also.

Writing modules is covered here: http://wiki.cmsmadesimple.org/tiki-inde ... ing+Smarty and http://wiki.cmsmadesimple.org/tiki-inde ... _ref_id=16 or you can always get ahold of us on IRC if you have questions.