Please help: pagelayout for modules

Author Message

Claire Lin

Thursday 24 July 2003 3:05:29 pm

I've asked this quesiton twice, and have tried answer my own qestion by looking at the code on template in the mean time -- without success. Please help.

The quesiton is: How do I make sure that advancedsearch.tpl shows under a certain pagelayout? (Similarly, how do I make sure that the basket.tpl shows under a certain pagelayout?) Because Search and Shop are not part of the Content module, I do not know how to assign "section" (and in turn pagelayout) to them.

Anyone please give me some clue? Even just where to look for the relevant php codes will be great...

Thanks a lot in advance.
Claire

Alex Jones

Friday 25 July 2003 6:35:31 am

Out of curiousity, have you tried to turn on template debugging so it displays each template that is used on the page? This might give you an idea of where the code for search and shopping are generated.

Change the following code (disabled > enabled) in site.ini or add it to the site.ini.append for the site you are working on to enable debugging.

[TemplateSettings]
Debug=disabled

Just a thought,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Jan Borsodi

Saturday 26 July 2003 4:31:51 am

You should take a look at the kernel/user/login.php file, look at the bottom and you'll see the lines.

if ( $ini->variable( 'SiteSettings', 'LoginPage' ) == 'custom' )
$Result['pagelayout'] = 'loginpagelayout.tpl';

Which tells eZ publish to use loginpagelayout.tpl for pagelayout template instead of the standard.
The 'if' statement is only there to see if a custom layout should be used.

The downside to this method is that you have modify the code for advanced search. We generally do not recommend this due to problems with future updates.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Jan Borsodi

Saturday 26 July 2003 5:30:09 am

I started a discussion on how this can be solved without PHP code here:
http://ez.no/developer/ez_publish_3/forum/suggestions/applying_features_to_modules_and_views

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Claire Lin

Sunday 27 July 2003 10:25:33 am

Thank you~!! I've changed the relevant php code.
Claire

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 18 2025 16:18:46
Script start
Timing: Jan 18 2025 16:18:46
Module start 'layout'
Timing: Jan 18 2025 16:18:46
Module start 'content'
Timing: Jan 18 2025 16:18:47
Module end 'content'
Timing: Jan 18 2025 16:18:47
Script end

Main resources:

Total runtime0.5966 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.0391152.6250
Module start 'layout' 0.00580.0030 741.664139.4609
Module start 'content' 0.00870.5865 781.1250598.8672
Module end 'content' 0.59530.0013 1,379.992216.1563
Script end 0.5966  1,396.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5518160.0002
Check MTime0.00130.2254160.0001
Mysql Total
Database connection0.00070.121310.0007
Mysqli_queries0.548191.8678650.0084
Looping result0.00050.0872630.0000
Template Total0.570095.520.2850
Template load0.00210.353520.0011
Template processing0.567995.184120.2839
Template load and register function0.00010.023810.0001
states
state_id_array0.00080.129210.0008
state_identifier_array0.00070.119820.0004
Override
Cache load0.00180.2956320.0001
Sytem overhead
Fetch class attribute can translate value0.00070.125430.0002
Fetch class attribute name0.00080.139870.0001
XML
Image XML parsing0.00090.157430.0003
class_abstraction
Instantiating content class attribute0.00000.001980.0000
General
dbfile0.00110.1787230.0000
String conversion0.00000.001840.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs