Share » Forums » Setup & design » Override full ezxmltags folder

Override full ezxmltags folder

Override full ezxmltags folder

Tuesday 21 April 2009 5:10:52 am - 5 replies

Author Message

Damien Pobel

Wednesday 22 April 2009 2:02:30 pm

Hi Guilllaume,

The easiest way to do that is probably to use a new siteaccess with its own design. So you just have to put your xml tags templates in the right folder and it should work.

Another solution is to play with eZTemplateDesignResource API to build your own override condition. For instance, in your module before calling the template engine you can write something like :

$res = eZTemplateDesignResource::instance();
$designKeys = array( array( 'my_condition', 'a_value' ) );
$res->setKeys( $designKeys );

And then you can write override rules like that :

[a_condition]
Source=path/to/the/original.tpl
MatchFile=path/to/new.tpl
Subdir=templates
Match[my_condition]=a_value

to use specific templates in your module only.

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

André R.

Wednesday 22 April 2009 2:18:11 pm

The last suggestion might not work on 4.1, because of this:
http://issues.ez.no/IssueView.php?Id=14328&activeItem=52

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Peter Putzer

Thursday 23 April 2009 12:31:04 am

André: I've noted something similar with my (unpublished) eZXMLOutputHandler override (it allows you to define different views that can be used as an override key - for example, to have a simple way to get a proper plain text string from an XMLText field).

For 4.1 I had to override an additional method, reintroducing the old DesingKeys handling - why exactly did you change that? Or is there a clean way to add a new DesignKey in a subclass of eZXMLOutputHandler?

Accessible website starting from eZ publish 3.0 (currently: 4.1.0): http://pluspunkt.at

André R.

Thursday 23 April 2009 1:10:20 am

> reintroducing the old DesingKeys handling - why exactly did you change that?

That is explained in the issue.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Peter Putzer

Thursday 23 April 2009 2:32:03 am

OK, but is there a way to cleanly add an additional design key in the XMLOutputHandler?

Accessible website starting from eZ publish 3.0 (currently: 4.1.0): http://pluspunkt.at

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu