Forums / Setup & design / [solved] Override the pagelayout only for the home page

[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

eZ debug

Timing: Jan 30 2025 21:22:42
Script start
Timing: Jan 30 2025 21:22:42
Module start 'content'
Timing: Jan 30 2025 21:22:42
Module end 'content'
Timing: Jan 30 2025 21:22:42
Script end

Main resources:

Total runtime0.2280 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 588.1719370.2734
Module start 'content' 0.00830.0162 958.44531,009.7188
Module end 'content' 0.02450.2034 1,968.16413,898.0391
Script end 0.2279  5,866.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00472.0537200.0002
Check MTime0.00140.6041200.0001
Mysql Total
Database connection0.00080.348710.0008
Mysqli_queries0.127455.88721410.0009
Looping result0.00140.61301390.0000
Template Total0.202889.010.2028
Template load0.00070.321210.0007
Template processing0.202188.650410.2021
Override
Cache load0.00050.217510.0005
Sytem overhead
Fetch class attribute can translate value0.00180.778510.0018
XML
Image XML parsing0.00030.116210.0003
General
dbfile0.01265.5463200.0006
String conversion0.00000.002230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs