Displaying source code as content
Posted: Wed May 28, 2008 10:42 am
Hi,
This may be known to everyone apart from me, but as it took me ages to find out I thought I would post it as a tip.
I needed to be able to display some source code (php/c/bash) on my site, but found that a lot of elements in the code clashed with the Smarty engine.
Code between the Smarty tags {literal} {/literal} is not parsed by Smarty so is output normally, and doesn't cause those nasty Smarty compilation errors.
Thanks for a great CMS chaps. I now have a way of finally inflicting my little programs on the world.
All the best, Wemps.
This may be known to everyone apart from me, but as it took me ages to find out I thought I would post it as a tip.
I needed to be able to display some source code (php/c/bash) on my site, but found that a lot of elements in the code clashed with the Smarty engine.
Code between the Smarty tags {literal} {/literal} is not parsed by Smarty so is output normally, and doesn't cause those nasty Smarty compilation errors.
Thanks for a great CMS chaps. I now have a way of finally inflicting my little programs on the world.
All the best, Wemps.