[solved] Override the pagelayout only for the home page

Author Message

Xavier Dutoit

Thursday 14 July 2005 5:28:19 am

Hi,

For a site, I need to have a different layout for the home page (aka "splash screen from hell" ;).

I've created :

[homepage]
Source=pagelayout.tpl
MatchFile=homepage.tpl
Subdir=templates
Match[node]=2

It works fine for the "/" url, but it unfortunately applies also on "content/view/sitemap/2" or "content/browse".

Any idea to have a different pagelayout only for the content/view/full (the default view) and not for the others ?

Thanks in advance,

X+

http://www.sydesy.com

Konrad Mazurkiewicz

Thursday 14 July 2005 8:24:06 am

Hi,
my idea is using cookie in template to select apprioprate design.
May it help you.

Regards
Konrad

Paul Borgermans

Thursday 14 July 2005 8:31:27 am

Hi Xavier

What I do is just create a dummy node under the root node (folder mostly) which is the home and also the default page. You can override the pagelayout (if needed) and full view templates and still have sitemap (and other functionality?) unaffected.

Regards

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Łukasz Serwatka

Saturday 16 July 2005 4:01:55 am

Hi Xavier,

Alternatively you can use layout module. Create your "splash screen from hell" ;) set name of tpl splash.tpl and configure layout.ini.append.php file than in site.ini.append.php put for example

[SiteSettings]
IndexPage=/layout/set/splash/content/view/full/2

You don`t have to use ($module_result.content) inside splash.tpl. Just XHTML code for splash screen. This should work also.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Stéphane Cloutier

Saturday 16 July 2005 7:11:07 am

But there's no splash setting in layout.ini???

Qupanuaq - Snow bunting

Łukasz Serwatka

Saturday 16 July 2005 7:52:28 am

That is correct.

You have to add settings in layout.ini.append.php in your siteaccess and put splash_pagelayout.tpl in your design/my_design/templates dir.

[splash]
PageLayout=splash_pagelayout.tpl 

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Xavier Dutoit

Monday 25 July 2005 5:47:01 am

Back from senegal.

Thanks for your help, I went the Lukasz way and it works like a charm (well, as charming as a splash screen can be).

As Paul suggestion to use a dummy node, the problem is that I often have a menu listing all the nodes under the top node (2), and I don't want a "dummy" item on my menu.

A solution would have been to put that dummy node under the media folder (it has a tendency to contain everything I don't want directly visible on the content tree).

X+

http://www.sydesy.com

Lex 007

Wednesday 27 July 2005 9:15:12 am

Hello,

Same as Xavier ! I would like to apply a special design for the home page, but I don't want this design to apply to the sitemap ... Template file is : design\MY_CUSTOM_DESIGN\templates\home.tpl

I tried the trick, but it didn't work for me. Could you give me more detailed steps please ?

Lex

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 11:30:30
Script start
Timing: Jan 18 2025 11:30:30
Module start 'layout'
Timing: Jan 18 2025 11:30:30
Module start 'content'
Timing: Jan 18 2025 11:30:31
Module end 'content'
Timing: Jan 18 2025 11:30:31
Script end

Main resources:

Total runtime0.7425 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.2734152.6563
Module start 'layout' 0.00540.0029 741.929739.5078
Module start 'content' 0.00830.7328 781.4375761.2734
Module end 'content' 0.74110.0014 1,542.710920.7344
Script end 0.7425  1,563.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.5452160.0003
Check MTime0.00170.2328160.0001
Mysql Total
Database connection0.00080.104410.0008
Mysqli_queries0.661389.0661800.0083
Looping result0.00090.1271780.0000
Template Total0.712696.020.3563
Template load0.00370.496920.0018
Template processing0.708995.475920.3545
Template load and register function0.00010.013210.0001
states
state_id_array0.00090.115910.0009
state_identifier_array0.00070.096020.0004
Override
Cache load0.00330.4441510.0001
Sytem overhead
Fetch class attribute can translate value0.00060.082360.0001
Fetch class attribute name0.00110.1538130.0001
XML
Image XML parsing0.00300.402460.0005
class_abstraction
Instantiating content class attribute0.00000.0041150.0000
General
dbfile0.00240.3300430.0001
String conversion0.00000.001240.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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/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: 33
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs