Forums / Setup & design / Replace a string

Replace a string

Author Message

Ted Striker

Wednesday 28 February 2007 4:40:21 am

Hi,

I'm trying to dynamically replace and output to template an existing text, let's say:

"CompanyName" in {$node.object.data_map.intro.content.output.output_text}

by another text like

<strong><font color="#FF0000">Company</font><font color="#666666">Name</font></strong>

is it possible?

does eZpublish have any function like "str_replace" in php??

Thank you in advance!

Can you feel it Mr. Anderson? Closing in on you? Oh I can, I really should thank you after all. It was, after all, it was your life that taught me the purpose of all life. Purpose of life is to end.

Brookins Consulting

Wednesday 28 February 2007 6:03:28 am

Use the wrap_operator, http://ezpedia.org/wiki/en/ez/wrap_operator

eZ Partner | North American Experience
http://brookinsconsulting.com/experience

Kristof Coomans

Wednesday 28 February 2007 6:55:12 am

Or http://ez.no/community/contribs/template_plugins/string_replace_operator

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Ted Striker

Thursday 14 June 2007 1:34:17 am

Ups!! forgot to reply

ezstr_replace extension works fine... I reccommend using this simple but useful extension...

thanks to all!!!

Can you feel it Mr. Anderson? Closing in on you? Oh I can, I really should thank you after all. It was, after all, it was your life that taught me the purpose of all life. Purpose of life is to end.