Thursday 27 April 2006 1:01:54 am
You can override anything in your extension.
But you've gotta put it all in there, and it's some notepad coding.
Just create a
extension/your_extension/design/your_designname/templates/my_pagelayout.tpl
and
extension/your_extension/settings/siteaccess/your_designname/override.ini.append.php
and the code that needs to be in there...
what I did was just this, it's even easier:
extension/extension_name/design/your_designname/templates/pagelayout.tpl
and just write some code in there, clear cache, works here.
off course you've gotta set the designname of your site in some Site.ini (SiteDesign var.)
Greets,
Clemens
Thursday 27 April 2006 8:05:29 am
You also got to tell eZ that your extension contains design elements:
In extension/your_extension/settings/design.ini.append, you put:
[ExtensionSettings] DesignExtensions[]=your_extension
Modified on Thursday 27 April 2006 8:06:10 am by Kristof Coomans
Wednesday 10 May 2006 1:48:34 pm
Hello,
Ok , it Works !!!
My mistake was that the source tree of my code was :
extension/my_extension/design/standard/templates/pagelayout.tpl
at this place the pagelayout override doesn't work....
If I replace standard by the design name of the site, it works...
So, I have a question... for a generic extension, I don't know the design name, How can I do for this override works with "standard" as design name..
Thanks for your help
Tuesday 16 May 2006 11:30:06 am
Hi,
It looks first in the design/xxx (as defined by our siteaccess), then in the extension.
That's kind of logic, as that is unlikely that I want your extension to replace my pagelayout, but if you want it that way, just delete your design/xxx/template/pagelayout.tpl and it will use the one in your extension.
There has been a long discussion about the proper order on the override. I don't remember the details, beside it wasn't always logical and your surest best is to test ![]()
X+
Saturday 25 November 2006 11:27:43 am
Hi,
I'm working now since 3 weeks with ez, after much reading I would suggest this way:
Let's say you have following configuration:
siteaccess:<i>plain_site</i>
design: <i>plain_site</i>
<b>In your extension:</b>
1. Choose a new design name eg: your_extension_design
2. Create extension/your_extension/settings/design.ini.append.php
<?php /* #?ini charset="utf-8"? [ExtensionSettings] DesignExtensions[]=your_extension */ ?>
3. Create extension/your_extension/design/your_extension_design/templates/your_new_pagelayout.tpl
as your override pagelayout.
<b>in the siteaccess setting</b>:
like Xavier said it's unlikely that one want your extension to replace his pagelayout by extension installation, so for the override to work let users change their config as follow:
1. In settings/siteaccess/your_siteacces/site.ini.append.php modify/add the design settings as follow:
[DesignSettings] SiteDesign=plain_site AdditionalSiteDesignList[]=your_extension_design AdditionalSiteDesignList[]=base
more on AdditionalSiteDesignList here: http://ez.no/doc/ez_publish/techn...ignsettings/additionalsitedesignlist
2. In settings/siteaccess/your_siteacces/override.ini.append.php modify/add the override as follow:
[your_extension_pagelayout] Source=pagelayout.tpl MatchFile=your_new_pagelayout.tpl Subdir=templates
3. Make sure your extension is active in settings/siteaccess/your_siteacces/site.ini.append.php:
[ExtensionSettings] ActiveAccessExtensions[]=your_extension
Those settings work for me and I think it's the right way to go, but as I said I'm a new ez user.
Hope this helps.
Marc
Saturday 25 November 2006 1:34:05 pm
To override your paglayout no mather what:
rename your pagelayout.tpl to myextension_pagelayout.tpl
and place it in myextension/design/standard/templates/
add a entry in myextension/settings/override.ini to override pagelaout.tpl
remember that this will also affect the admin siteaccess, so either put override.ini in myextension/settings/siteaccess/mysiteaccess/ or only activate the extension for the siteaccesses you use it on.
the override entry looks like this:
[myextension_paglayout_override]
Source=pagelayout.tpl
MatchFile=myextension_paglayout.tpl
Subdir=templates
Match[section]=25
the match is optional.
Modified on Monday 27 November 2006 9:54:51 am by André R.
You must be logged in to post messages in this topic!