Forums / Setup & design / override pagelayout.tpl

override pagelayout.tpl

Author Message

srikanth mn

Tuesday 21 July 2009 5:17:11 am

Hi, I am new to eZpublsih. can anyone help me to solve this problem

I have a home page tempelate "pagelayout.tpl" in the location "design\plain_site\templates".

I have created a new tempelate "special.tpl" in the location "design\plain_site\override\templates".

I have created a new folder called "special" using admin interface and created a article inside special folder, which will be the content for special.tpl.

In special.tpl i have written

{$module_result.content} in body section

and in "override.ini.append.php" i have places the following code.

[special]
Source=pagelayout.tpl
MatchFile=sitemap.tpl
Subdir=templates
Match[node]=123 // node id of article

Problem:- if i go to special page i am able to view the content of special article but not the tempelate. it is rendering pagelayout.tpl tempelate.

what should i do to get special.tpl tempelate

Ivo Lukac

Tuesday 21 July 2009 8:47:54 am

[special]
Source=pagelayout.tpl
MatchFile=sitemap.tpl<<<<<----------------- sitemap.tpl??? here goes special.tpl
Subdir=templates
Match[node]=123 // node id of article

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

srikanth mn

Tuesday 21 July 2009 11:10:24 pm

I have changed the MatchFile to special

MatchFile=special.tpl

Still i am not able to get the special template. it is taking pagelayout.tpl tempelate

Gaetano Giunta

Wednesday 22 July 2009 12:40:31 am

- make sure your override.ini is taken into account (look in the admin interface in the 'ini settings' tab)
- make sure your rule for overriding based on node_id does not come after some other rule that might apply based on class_id or something else less specific: the first rule that matches is applied

Principal Consultant International Business
Member of the Community Project Board