Forums / Setup & design / Moving a siteaccess design into an extension

Moving a siteaccess design into an extension

Author Message

Graham Tillotson

Sunday 09 December 2007 4:46:59 am

I would like to move an existing design (/design/mydesign) into an extension (/extension/mysite/design/mydesign) and was wondering if anyone had a list of steps to make this happen. Even a basic list would help and I could take it from there.

I see that in the ezwebin example the core designs (admin, base, standard) all remain in the /design/ directory, and that makes sense in terms of upgrades, but why is there an empty shell for templates in /design/ezwebin? Is that directory structure necessary even though there are no templates stored there?

At a higher level, what are the benefits of moving a design into an extension? I just want to make sure that I'm setting up templates in a way that is aligned with best practices for future releases.

DUO : CONSULTING
Web content management experts
www.duoconsulting.com

Jon Staines

Monday 10 December 2007 6:25:54 am

Its pretty straight forward to use the design as an extension. First come up with a name for your extension, might as well use mydesign for example purposes. Make a directory within extension for that. Also make design and settings folders inside your new mydesign folder. Then move the /design/mydesign that you already have into /extension/mydesign/design/. Your structure should now be something like:

/extension
 -collectexport
 -ezdhtml
 -ezodf
 -ezpaypal
 -ezwebin
 -mydesign
 --settings
 --design
 ---mydesign
 ----override
 ----templates

And so on.

Within the settings folder you need a design.ini.append.php with at least the following:

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

[ExtensionSettings]
DesignExtensions[]=mydesign

*/ ?>

In you siteaccess settings (eg /settings/siteaccess/eng/) you need to alter site.ini.append.php. Look for the DesignSettings part and add your design:

[DesignSettings]
SiteDesign=mydesign
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base

And activate the extension:

[ExtensionSettings]
ActiveAccessExtensions[]=mydesign

Clear the cache and check your site. This should be all you need to get going.

Graham Tillotson

Monday 10 December 2007 12:16:03 pm

This is great -- I'll let you know how it goes. I went through these basic steps the first time around, but my design kept reverting back to base/standard. I'll go through it again and let you know how it goes. I'm sure it is a config setting on my side somewhere.

DUO : CONSULTING
Web content management experts
www.duoconsulting.com

Piotrek Karaƛ

Monday 10 December 2007 12:54:02 pm

Hi there,

> <i>At a higher level, what are the benefits of moving a design into an extension? I just want to make sure that I'm setting up templates in a way that is aligned with best practices for future releases.</i>

I don't know any core arguments, but I'd expect that separation is always a good choice. Easier backup, easier upgrades, easier code referral, easier preparation of own packages... You may always need to turn a design extension into a more complex one, for example by adding your own module/views, settings, additional classes, translations etc. Much easier to manage if you have it all in one space.

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Graham Tillotson

Wednesday 12 December 2007 4:04:51 am

Ha! Good old eZ. Sure enough -- the only thing I missed was the line in design.ini.append.php. I updated it for my siteaccess, cleared the cache, and the design came up. Thanks much for the help.

I totally agree that the single directory is a much cleaner way to go for management and backups. That alone is worth moving the design over.

DUO : CONSULTING
Web content management experts
www.duoconsulting.com

eZ debug

Timing: Jan 31 2025 00:25:15
Script start
Timing: Jan 31 2025 00:25:15
Module start 'content'
Timing: Jan 31 2025 00:25:15
Module end 'content'
Timing: Jan 31 2025 00:25:15
Script end

Main resources:

Total runtime0.1647 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.0625370.2734
Module start 'content' 0.00650.0174 958.33591,009.6094
Module end 'content' 0.02390.1408 1,967.94533,898.2891
Script end 0.1647  5,866.2344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00452.7189200.0002
Check MTime0.00140.8312200.0001
Mysql Total
Database connection0.00060.388010.0006
Mysqli_queries0.074044.91811410.0005
Looping result0.00090.55801390.0000
Template Total0.140385.210.1403
Template load0.00080.465110.0008
Template processing0.139584.713510.1395
Override
Cache load0.00050.328510.0005
Sytem overhead
Fetch class attribute can translate value0.00191.161010.0019
XML
Image XML parsing0.00030.163910.0003
General
dbfile0.01046.3119200.0005
String conversion0.00000.003030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs