Forums / Setup & design / Put xml tags in a template ??? Please help

Put xml tags in a template ??? Please help

Author Message

H-Works Agency

Sunday 30 April 2006 9:48:06 am

Hi all,

I would like to use XML tags in my templates.

Those tags would be replaced by their corresponding template. Same behavior that in the XMLBlock datatype in a class...but this time in the template :

{'<header>TITLE</header>'|ezxml}

Would call the header.tpl template.

How to do this ? Is this the good way to proceed ? Why is it so hard to get infos about this issue ?

Thanx for the help.

EZP is Great

liu spider

Monday 01 May 2006 9:45:47 am

why not use xhtml tags directly?

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd

H-Works Agency

Monday 01 May 2006 10:04:57 am

Well i use EZP in a multiple site configuration (30 sites).

My whole work is to make as few template override as i possible.

For exemple i have a full/folder.tpl override for all my sites.

But inside this template on some site i want to use :

<h1>{$node.name}</h1>

And on other site :

<h1>{$node.name|texttoimage('title')}

Thats why i want to call certain template to replace xml tags.

For the exemple above i could use inside folder.tpl :

{"<header>$node.name</header>"|ezxml()}

if this operator would exist it would then call :

design:content/datatype/view/ezxmltags/header.tpl

This template could be override to use "<h1></h1>' or to use an certain image without changing folder.tpl.

It is very strange for me that this function doesn't exist.

All i am asking it being able to use the same synthax in a template as you can in XMLBloc datatype.

EZP is Great