Displaying Code On Page
Greetings all, wasn't sure which section this belonged in, but does anyone know how to allow for code to be displayed on a page? You see it all the time on PHP or HTML example/tutorial pages - and I want to have a similar snippet on one of my pages to help people add PLIGG THIS buttons to their sites.
Usually this is accomplished by using & lt; and & gt; (minus that little space) to get the less than (<) and greater than (>) characters. This works fine on an HTML or a PHP page to avoid the page pre-rendering the code and thinking it's real code, when it's just supposed to be displayed as text.
Unfortunately when it's put into a Smarty template, the template is passed to the Smarty engine, converts them to the actual symbols and then when it gets to the PHP display... it tries to run the code and pooches the whole thing.
Any ideas of a way around this that doesn't involve a GIF or replacing the less than and greater thans with square brackets?
Cheers.
|