Forums / Setup & design / how to edit content which is some php code source?

how to edit content which is some php code source?

Author Message

Matthieu M

Monday 14 July 2008 1:45:45 am

Hello everybody,

I'm trying to set with ezpublish 4.0 some php source code in a article: I wants to put some php file content in this article.
Which is the better way to do that?
I've try to set a online ezxmltags which content the following template:

<code>
${sourcecode}
</code>

But line feeds are not interpreted.
How line feeds can be parse too with a nl2br?

Or is there a way to set up some items in media library which can be used too?
Best regards,

Ɓukasz Serwatka

Monday 14 July 2008 9:38:44 am

You may use <literal> tag for it.
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/xml_tags#unformatted_text

Also you can install extension such as http://projects.ez.no/ezgeshi and enable syntax highlighting.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Matthieu M

Saturday 19 July 2008 8:29:45 am

hello,

thanks for your answer.
Literal tag sound good, but there is no syntax color.
I've tried to install these extension, seems to be good (it's active in the extension loaded), but not sure to find how to use it: there is no documentation.
Have you a tip about it?
Best regards,

Matthieu