New extension to customize ezwebin [SOLVED]

Author Message

Lo' F.

Sunday 20 June 2010 1:50:17 pm

Hi there,

I created a new extension in the eZ 'extension' folder with the intent of overriding ezwebin layout with a custom one...

But it seems not to do what it is meant for.

Here are all the steps I did:

[root@ip ~] cd /var/www/vhosts/website.net/httpdocs/extension

[root@ip extension] mkdir eznew

[root@ip extension] cd eznew

[root@ip eznew] mkdir design

[root@ip eznew] cd design

[root@ip design] mkdir new

[root@ip design] cd new

[root@ip new] mkdir images stylesheets javascript templates override

[root@ip new] cd override

[root@ip override] mkdir templates
[root@ip extension] cp ezwebin/design/ezwebin/templates/pagelayout.tpl eznew/design/new/templates/
[root@ip extension] cp -rf  ezwebin/design/ezwebin/stylesheets/* eznew/design/new/stylesheets/
[root@ip eznew] mkdir settings

[root@ip eznew] cd settings

[root@ip settings] touch site.ini.append.php

[root@ip settings] touch template.ini.append.php

[root@ip settings] touch design.ini.append.php

eznew/settings/design.ini.append.php

<? /* #?ini charset="utf-8"?

[ExtensionSettings]

DesignExtensions[]=eznew

*/ ?>
[root@ip eznew] mkdir autoloads

[root@ip eznew] mkdir classes

[root@ip eznew] cd autoloads

[root@ip autoloads] touch eztemplateautoload.php

eznew/autoloads/eztemplateautoload.php

<?php

$eZTemplateOperatorArray = array();

?>

eznew/settings/site.ini.append.php

<?php /* #?ini charset="utf-8"?

[TemplateSettings]

ExtensionAutoloadPath[]=eznew

*/ ?>
[root@ip eznew] mkdir translations

[root@ip eznew] cd translations

[root@ip translations] mkdir ita-IT

[root@ip translations] mkdir eng-GB

[root@ip translations] cd ita-IT

[root@ip ita-IT] touch translation.ts

extension/eznew/translations/ita-IT/translation.ts

<!DOCTYPE TS>

<TS>

<content>

<span> </span><name></name>

<span></span><message>

<span></span><source></source>

<span></span><translation></translation>

<span></span></message>

</content>

</TS>
[root@ip translations] cp ita-IT/translation.ts eng-GB

eznew/settings/site.ini.append.php

<?php /* #?ini charset="utf-8"?

...

[RegionalSettings]

TranslationExtensions[]=eznew

*/ ?>

Activating the extension:

setting/siteaccess/public/site.ini.append.php

<?php /* #?ini charset="utf-8"?

...

[ExstensionSettings]

ActiveAccessExtensions[]=eznew

...

*/ ?>

Activating the design:

settings/siteaccess/public/site.ini.append.php

<?php /* #?ini charset="utf-8"?

...

[DesignSettings]

SiteDesign=new

...

AdditionalSiteDesignList[]=ezwebin

AdditionalSiteDesignList[]=base

AdditionalSiteDesignList[]=standard

...

*/ ?>

...How comes eZ doesn't apply the changes made in the pagelayout.css of this extension?

Any idea? Did I miss something?

Many, many thanks in advance!

loredanaebook.it

Gaetano Giunta

Sunday 20 June 2010 2:24:43 pm

- you can check if your ini files are correctly taken into account by looking in the admin interface, in the setup tab, 'ini settings' - pick the 'public' siteacces

- by enabling the debug output for the public siteaccess, you will find the list of used templates printed out at the bottom of the page

- I imagine you cleared the caches at least once after applying all your changes, right?

Principal Consultant International Business
Member of the Community Project Board

Lo' F.

Monday 21 June 2010 6:21:38 am

Thanks for your reply!

The ini settings of my public SiteAccess looks this way..

design.ini public SiteAccess:

[ExtensionSettings]

DesignExtensions

default [0]

extension:ezodf [1] ezodf

extension:ezoe [2] ezoe

extension:ezwebin [3] ezwebin

extension:ezgmaplocation [4] ezgmaplocation

extension:ezstarrating [5] ezstarrating

extension:ezwt [6] ezwt

extension:ezjscore [7] ezjscore

extension:ezmultiupload [8] ezmultiupload

extension:eznew [9] eznew

site.ini public SiteAccess:

[TemplateSettings]

ExtensionAutoloadPath

default [0]

extension:ezoe [1] ezoe

extension:ezwebin [2] ezwebin

extension:ezgmaplocation [3] ezgmaplocation

extension:ezstarrating [4] ezstarrating

extension:ezwt [5] ezwt

extension:ezjscore [6] ezjscore

extension:ezmultiupload [7] ezmultiupload

extension:eznew [8] eznew
[RegionalSettings]

TranslationExtensions

default [0]

extension:ezodf [1] ezodf

extension:ezoe [2] ezoe

extension:ezwebin [3] ezwebin

extension:ezgmaplocation [4] ezgmaplocation

extension:ezstarrating [5] ezstarrating

extension:ezmultiupload [6] ezmultiupload

extension:eznew [7] eznew
[ExtensionSettings]

ActiveAccessExtensions

default [0] 


ActiveExtensions

default [0]

override [1] eznew

override [2] ezmultiupload

override [3] ezjscore

override [4] ezwt

override [5] ezstarrating

override [6] ezgmaplocation

override [7] ezwebin

override [8] ezoe

override [9] ezodf
[DesignSettings]

StandardDesign

defaul "standard" 


SiteDesign

siteaccess "new" 


AdditionalSiteDesignList

default [0]

siteaccess [1] ezwebin

siteaccess [2] base

siteaccess [3] standard

- I am not sure I understand what you mean by saying "enabling the debug output"..

In the public siteAccess site.ini there is ..

[DebugSettings] 

DebugOutput override disabled

..but it doesn't allow me to change the default setting (in brackets it says value cannot be modified).

More precisely:

"

Predefinito (non può cambiare) - disabled

Impostazione SiteAccess - Nessun valore

eznew - Nessun valore

ezmultiupload - Nessun valore

ezjscore - Nessun valore

ezwt - Nessun valore

ezstarrating - Nessun valore

ezgmaplocation - Nessun valore

ezwebin - Nessun valore

ezoe - Nessun valore

ezodf - Nessun valore

Impostazione di override (globale) - disabled

"

... or maybe... I see... it's the "Debug Output" checkbox in the "Quick Setting" of the right area which I need to tick, is that right? And how that's supposed to show me the used templates?!

- Yes I did! I cleared all the caches after each and every change..

loredanaebook.it

Gaetano Giunta

Tuesday 22 June 2010 1:25:51 am

To change the debug settings, you have two options

- quick and dirty: use the buttons at the bottom of the right-hand column. Those allow you to enable debug either in a single siteaccess or globally (in the override configs)

- by hand: just open up site.ini.append;php (the siteaccess one or the override one depending on your specific need) and add at the bottom this block of code:

[DebugSettings]
DebugOutput=enabled
DebugRedirection=disabled
AlwaysLog[]=strict
AlwaysLog[]=debug
AlwaysLog[]=warning

[ContentSettings]
ViewCaching=disabled

[TemplateSettings]
DevelopmentMode=enabled
ShowUsedTemplates=enabled
Debug=disabled
ShowXHTMLCode=disabled
TemplateCache=disabled

[OverrideSettings]
Cache=disabled

This will

  • enable debug output
  • print list of used templates in the debug output
  • disable most caches
  • enable most logs

Principal Consultant International Business
Member of the Community Project Board

Lo' F.

Sunday 12 September 2010 1:04:04 pm

It took me a while to understand about eZ folders' structure, siteaccesses and settings but now I'm eventually there (or at least in the right track..) and I like to give a reply to this old post of mine as I've never liked to leave a matter unfinished!

By the way, once you enter into the system you realize how straightforward eZ is!

Alrighty then..

Created the "eznew" extension folders structure (above steps are made from the shell, but it can be done directly from the file manager inside the Ez extension folder - it might be easier..), added the settings in the .ini.append.php files in the "eznew"'s inner folders (for loading its design, template operators and translations - again as above), since I wanted it to be applied for all of the website's siteaccesses, I had to modify the global site.ini.append.php inside settings/override/

[ExtensionSettings]
ActiveExtensions[]
...
ActiveExtensions[]=eznew

..and, in order to activate the design, had to modify the site.ini.append.php of every siteaccess (e.g. ita - eng - chi...)

[DesignSettings]
SiteDesign=eznew
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base
AdditionalSiteDesignList[]=standard

So now I can customize the ezwebin extension by copying the original template in here and make the changes (..for all of this time I have been modifying the original files from ezwebin... time to restore it at its initial shape!)

loredanaebook.it

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.