[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.