Forums / Setup & design / New site designs as an Extension

New site designs as an Extension

Author Message

Davide Garzetti

Thursday 12 March 2009 4:28:31 am

I read that some people to customize EzPublish site designs create an Extension insted of subdirectory in Design folder as EzPublish manual suggests.

Are there any advantages in some specific area ( es. performance) ?

Thank you for you comments.

Jean-Yves Zinsou

Thursday 12 March 2009 4:37:20 am

Hi there,

my reason for creating an extension, is that it can be moved around easily and that it is very simple to upgrade your ezpublish install !!

Do Androids Dream of Electric Sheep?
I dream of eZpubliSheep....
------------------------------------------------------------------------
http://www.alma.fr

André R.

Thursday 12 March 2009 5:00:09 am

Same here, makes it easier to upgrade, and usually there are some settings or even some more stuff that goes together with the design, so it really makes sense to use extensions for this. It also lets you override a specific design, so you can for instance place a design in you extensions called standard so that the templates override the default ones everywhere* (even admin), unless the template is defined in another design / extension with higher priority of course.

Doing everything in extensions became best practice internally in eZ back in 2005, so that's why ezwebin / ezflow are implemented like this as well.

* the concept I'm talking about here is placement overriding, no need for any override.ini rules, only place the file at the same location in a design/extension with higher priority (as defined by your SiteDesign, AdditionalSiteDesignList and ActiveExtensions settings).
override.ini overrides best for conditional overrides ("use this template on node id 55").

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Noicokuna Niemoge

Thursday 12 March 2009 5:47:46 am

Are there any tutorials concerning making designs as extensions?
It should be like this by default, no need for extra design folder, BTW :)

Shiki soku ze ku...

André R.

Thursday 12 March 2009 6:27:33 am

> Are there any tutorials concerning making designs as extensions?
No, but it's a matter of:
1. create a extension folder with design folder and a folder beneath there with design name
2. create a settings folder with a site.ini[.append.php] and a design.ini[.append.php] (last bits is for added security)
3. set [ExtensionSettings]DesignExtensions[]=myextension_name in the new design.ini
4. activate the extension in your settings/override/site.ini file
5. optional: define extension as translation extension if you need .ts files for your i18n needs using: [RegionalSettings]TranslationExtensions[]=myextension_name in site.ini
6. optional: if your design name is something other then the once activated, activate it with design settings mentioned above for the siteaccess you want it.

Look in the ezwebin extension for how all this is done(and more).

> It should be like this by default, no need for extra design folder, BTW :)
The design/ folder is for design bundled with ezpublish(in our case at least), admin might end up in an extension soon, but there should always be a fallback design (standard).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Noicokuna Niemoge

Thursday 12 March 2009 6:38:27 am

Thank you very much!

Shiki soku ze ku...

Davide Garzetti

Thursday 12 March 2009 8:44:26 am

I tested Andrè suggestions and all works fine but I have dicovered a drawback in this scenario:

1)Do login on the Admin interface click on Design tab and Templates (left menu item)
2) Search a template overriden (ie Pagelayout.tpl)

and you will find that EzP does not see templates override files inside extension design.

Noicokuna Niemoge

Saturday 14 March 2009 12:40:25 pm

I think that generally the template and design area of eZ needs some improvements...

Shiki soku ze ku...

Sébastien Morel

Saturday 14 March 2009 1:56:22 pm

Hi,

I have a question about this method, when you override the "view line" of a concent class, where do you put the section, in wich override.ini ?

In the override.ini of the extension or in the settings/siteaccess ?
I don't think is in the override.ini of the extension because the admin interface will be affect.

So, like ezwebin, it's in the siteaccess. I think that it's a good method but it is unfortunate that ez Publish can't use override method with the siteaccess.

In fact, It would be cool if we could override the settings of a siteaccess in an extension...

What do you think about this?

Séb
++

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

André R.

Saturday 14 March 2009 6:27:37 pm

David: I guess you places your siteaccess settings in the extension?

> I don't think is in the override.ini of the extension because the admin interface will be affect.

True, its because many of the gui parts in admin where you can see different stuff pr siteaccess doesn't support this scenario, we know about it and might already have a fix for it for 4.1.1 (4.1 is in deep freeze now, and the patch for this is pretty big.).

So currently best to have siteaccess settings (including overrides) in settings/siteaccess and not extension/*/settings/siteaccess.

> What do you think about this?

There is an issue about this, please comment on that there instead so we might come to an conclusion on that...( As I created the issue you can guess that I would like to solve it somehow :) ).
http://issues.ez.no/IssueView.php?Id=13382&activeItem=27

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom