Forums / Install & configuration / How to override the page layout?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

How to override the page layout?

Author Message

Christian Johansen

Friday 06 August 2010 5:17:16 am

I'm trying to create an ical_pagelayout to serve up some content as an ical feed. I've followed the steps outlined here: http://share.ez.no/forums/developer/pagelayout-icalendar

This kinda works - visiting http://mysite/layout/set/ical/mynode/ sets the right headers and so on, but I cannot for the life in me get eZ (4.0.3) to correctly load the page layout. I tried saving the layout several places:

  • design/myaccess/templates/ical_pagelayout.tpl
  • design/myaccess/override/templates/ical_pagelayout.tpl
  • ...and even in design/standard/ical_pagelayout.tpl

No matter where I put it, eZ tells me "can't load template 'ical_pagelayout.tpl' with resource 'design'". What am I doing wrong?

Romeo Antony

Friday 06 August 2010 5:49:04 am

Reasons may be either your overriding conditons for ical_pagelayout.tpl would be wrong or you didn't specified the correct design specifications in ini files? Can you check both of these?

Christian Johansen

Friday 06 August 2010 6:24:19 am

I'm not sure what you mean by "the correct design specifications in ini files"? Do you mean site design and so on? This is what I did:

settings/siteaccess/mysite/layout.ini.append:

[ical]

PageLayout=ical_pagelayout.tpl

I also added

settings/siteaccess/mysite/override.ini.append:

[ical_pagelayout]

Source=ical_pagelayout.tpl

MatchFile=ical_pagelayout.tpl

Subdir=templates

I tried keeping the layout file in design/mysite/templates/ical_pagelayout.tpl, which caused a lot of errors. It said "tried paths ...", then I copied the file over to one of those paths, namely design/mysite/override/templates/ical_pagelayout.tpl, and now I'm back to:

Warning: eZTemplate Aug 06 2010 15:14:02
No template could be loaded for "ical_pagelayout.tpl " using resource "design"

What am I missing?

Thiago Campos Viana

Friday 06 August 2010 7:35:20 am

Hi

You don't need:

settings/siteaccess/mysite/override.ini.append.php:

[ical_pagelayout]

Source=ical_pagelayout.tpl

MatchFile=ical_pagelayout.tpl

Subdir=templates

I think just:

settings/siteaccess/mysite/layout.ini.append.php:

....

[ical]

PageLayout=ical_pagelayout.tpl

...

and creating the file design/mysite/templates/ical_pagelayout.tpl is enough, write just a "hello" in this file just for testing purposes, but you may check your settings/siteaccess/mysite/site.ini.append.php if it includes your design folder in you design settings:

[DesignSettings]
SiteDesign=mysite

AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezflow
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base
AdditionalSiteDesignList[]=standard

Then clear all caches and test again. Even tough this may work, I highly recommend you upgrade your Exponential site to at least version 4.1.3, since it solves a critical issue regarding blank users registrations and others minor ones.

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Christian Johansen

Thursday 12 August 2010 12:41:07 am

Thanks, Thiago. Unfortunately, this still does not work for me. I still get "No template could be loaded for ical_pagelayout.tpl". I've double checked all settings. I even checked ownership and permissions for the file, but no luck.

I know that my site design is included, cause this is a running site, and e.g. the pagelayout.tpl from the same directed works fine elsewhere on the site. Is there any way I can get more debug information or whatever to figure out what's happening?