News module and Markdown?
News module and Markdown?
Is it possible to have the Markdown module render the articles written using the News module? The Markdown module works great with regular pages and I would like to use it for news articles as well.
Re: News module and Markdown?
Bump (please let me know if bumping is frowned upon here!).
I've been poking around trying to figure out if it's possible but without result. Does anyone know something about this? I tried to send a message to the admin of the Markdown module but haven't got an answer.
I've been poking around trying to figure out if it's possible but without result. Does anyone know something about this? I tried to send a message to the admin of the Markdown module but haven't got an answer.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: News module and Markdown?
in 0.13b2 the markdown module is included both as a tag, and as a modifier
although I haven't tried it, you should be able to do something like
although I haven't tried it, you should be able to do something like
Code: Select all
{cms_module module=news category=blah|markdown}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: News module and Markdown?
Nice! Although I get the following error message:calguy1000 wrote: in 0.13b2 the markdown module is included both as a tag, and as a modifier
although I haven't tried it, you should be able to do something likeCode: Select all
{cms_module module=news category=blah|markdown}
Code: Select all
Fatal error: Cannot redeclare identify_modifier_markdown() (previously declared in W:\var\www\pub\cmsms\modules\Markdown\markdown.php:110) in W:\var\www\pub\cmsms\lib\smarty\plugins\modifier.markdown.php on line 120
Code: Select all
string(85) "Smarty error: unable to read resource: "module_file_tpl:News;
summary.tpl
Re: News module and Markdown?
I'm assuming that the tags and the module are conflicting. php isn't too smart about having multiptle things named the same...
Try deactivating the markdown module. If it starts working, then I would suggest you do the modifier on your {content} ({content|markdown}) tags in your template(s) as well.
Try deactivating the markdown module. If it starts working, then I would suggest you do the modifier on your {content} ({content|markdown}) tags in your template(s) as well.
Re: News module and Markdown?
Sure, if I uninstall the Markdown module and e.g. use {$entry->content|Markdown} in the News Detail Template Markdown is applied to the News content. OTOH I now have to manually apply the modifier in each template, etc. I must say that I liked having Markdown as a separate module. Now, I haven't been using CMSMS for very long but it seems like a nice way to go. For example I had replaced the original Markdown script with the Markdown Extra version and added the Smartypants script which was easy (I could even create a new module called Markdown Extra come to think of it). But like I said, I'm not the one to say what's the best solution.Ted wrote: I'm assuming that the tags and the module are conflicting. php isn't too smart about having multiptle things named the same...
Try deactivating the markdown module. If it starts working, then I would suggest you do the modifier on your {content} ({content|markdown}) tags in your template(s) as well.
How about a way to specify for each page and news article whether to apply any modifier like Markdown? And maybe have alternative modifiers like Textile?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: News module and Markdown?
All I did to impliment the markdown module was to copy the markdown source into the smarty plugin directory. For the markdown tag I created a little file in the same directory that referred to the first.
Yes, you'll have to change your template or your pages to incorporate the markdown stuff, as markdown can now be applied to any content rather easily.
Yes, you'll have to change your template or your pages to incorporate the markdown stuff, as markdown can now be applied to any content rather easily.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: News module and Markdown?
Perhaps there can be a switch for this in admin panel ?calguy1000 wrote: Yes, you'll have to change your template or your pages to incorporate the markdown stuff, as markdown can now be applied to any content rather easily.