Share » Forums » Setup & design » Notification and template override

Notification and template override

Notification and template override

Wednesday 18 February 2009 2:59:35 am - 8 replies

Author Message

Norbert Wagner

Wednesday 18 February 2009 9:01:19 am

Hi Laurent, did you try to put an override condition in your override.ini file?
Regards,
Norbert

laurent le cadet

Wednesday 18 February 2009 9:25:53 am

Norbert,

As it's a bit different than to match a class identifier or a node, I don't really know how to write the override section.
Do you have an example?

In ezsubtreehandler.php, the .tpl is call like this:
$result = $tpl->fetch( 'design:notification/handler/ezsubtree/view/plain.tpl' );

But "design:" doesn't seems to be efficient.

Laurent

laurent le cadet

Wednesday 18 February 2009 9:37:55 am

Oups....

I did a mistake in the path : templates/notification/handler/ezsubtree/view<b>/plain</b>/plain.tpl

Sorry for this post

Norbert Wagner

Wednesday 18 February 2009 12:45:01 pm

Hi Laurent,
I've never exactly understood when a override directive is needed and when not.
But I would try it like this:

[plain_notification] 
Source=notification/handler/ezsubtree/view/plain/plain.tpl
MatchFile=path/to/your/template/plain.tpl
Subdir=templates

Hope that helps,

Norbert

laurent le cadet

Wednesday 18 February 2009 12:55:29 pm

Norbert,

My problem is solved because I realised that I made a mistake in the path to the file of my site design.

Override.

It's an important part of eZp.
In my case, no need to write a section in override.ini.
I just have to create a subtree in the site design.

Mothtly I use override.ini to declare a template for a new classe (and its different views) or a particular node like this:

[node_mycustomnode]
Source=node/view/full.tpl
MatchFile=full/mycustomnode.tpl
Subdir=templates
Match[node]=173

[full_mycustomclasse]
Source=node/view/full.tpl
MatchFile=full/mycustomclasse.tpl
Subdir=templates
Match[class_identifier]=mycustomclasse

Regards.

Laurent

Norbert Wagner

Thursday 19 February 2009 9:00:41 am

Hi Laurent,
yes the class template overrides are clear to me, thanks.
What I do not understand is the override of other parts of the system ...
Some times it seems to be enough to recreate the exact path in your design, other times it doesn't work and you have to write an override section. Here is an example were it doesn't work without:

[help_left_menu]
Source=parts/help/menu.tpl
MatchFile=parts/help/menu.tpl
Subdir=templates

Is there any logic I miss behind this?

Thanks,
Norbert

Stefano Bartoli

Friday 20 February 2009 11:55:03 am

Hi all,
I think that 'override.ini' overrides are for conditional overrides
(like for a specific node or class) while
placement overrides are for global 'override'.
I'm not completely sure about this because i've found different and strange behaviour, but perhaps it depends on fallback system.
Hope this is useful for you.

Stefano

Nick Sanders

Thursday 26 February 2009 4:48:10 pm

I just found this website that offers the best free auction designs and the best part is that they are FREE. In times like these saving every dollar counts. These are designs I would pay 10.00 each for. I am so excite about them that I thought I would share them with you all.

The site is : FreeAuctionDesigns.com

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

36 542 Users on board!

Forums menu