Overriding pagelayout.tpl for user module and custom view

Author Message

Everick Montagne

Thursday 24 January 2008 12:52:35 am

I've append this in override.ini.append.php but it did'nt work:

[myAccountPageLayout]
Source=pagelayout.tpl
MatchFile=myAccountPageLayout.tpl
Subdir=templates
Match[module]=user
Match[view]=myaccount

Could anyone tell me how to override the standard pagelayout.tpl for the user module?

Thank you for your help!

Piotrek Karaƛ

Thursday 24 January 2008 1:41:27 am

Is there actually 'myaccount' view in the user module? I don't know of anything like that and if you're thinking your custom view, then you may call any pagelayout template file you want on the PHP level:

$Result['content'] = $tpl->fetch( "design:user/myaccount.tpl" );
$Result['pagelayout'] = 'myaccountpagelayout.tpl'; 

Also look closely at the override matching options:
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_override_conditions

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Everick Montagne

Friday 25 January 2008 1:27:06 am

yes, I added the myaccount view to user module.

Thanks for your answer, it works !

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 00:11:06
Script start
Timing: Jan 19 2025 00:11:06
Module start 'layout'
Timing: Jan 19 2025 00:11:06
Module start 'content'
Timing: Jan 19 2025 00:11:07
Module end 'content'
Timing: Jan 19 2025 00:11:07
Script end

Main resources:

Total runtime1.1547 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0110 588.1719152.6563
Module start 'layout' 0.01100.0038 740.828139.5078
Module start 'content' 0.01481.1379 780.3359533.2031
Module end 'content' 1.15280.0019 1,313.539112.0938
Script end 1.1546  1,325.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3528160.0003
Check MTime0.00150.1306160.0001
Mysql Total
Database connection0.00160.137810.0016
Mysqli_queries1.095894.9014570.0192
Looping result0.00090.0782550.0000
Template Total1.104795.720.5523
Template load0.00210.184420.0011
Template processing1.102595.485220.5513
Template load and register function0.00020.013910.0002
states
state_id_array0.00140.121610.0014
state_identifier_array0.00130.114620.0007
Override
Cache load0.00170.1471160.0001
Sytem overhead
Fetch class attribute can translate value0.00080.069720.0004
Fetch class attribute name0.00160.139040.0004
XML
Image XML parsing0.00110.095820.0006
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00510.4375170.0003
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs