eZ Community » Forums » Setup & design » Override full ezxmltags folder
expandshrink

Override full ezxmltags folder

Override full ezxmltags folder

Tuesday 21 April 2009 2:10:52 pm - 5 replies

Hi,

I whould like override ezxmltags template for a specific module...

Can I change the template_root for a specifique module ?

Else if I want override the full ezxmltags folder I must past to a specifique siteaccess and a specific sitedesign...

Any issue ?

Wednesday 22 April 2009 11: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.

Wednesday 22 April 2009 11: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

Thursday 23 April 2009 9: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?

Thursday 23 April 2009 10:10:20 am

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

That is explained in the issue.

Thursday 23 April 2009 11:32:03 am

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

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from