Design Extension and the ezdesign template operator

Author Message

Seth Gottlieb

Monday 10 August 2009 9:52:27 am

Hello,

In the past, I have created designs under the /design directory and I am just getting up to speed on encapsulating a site design in an extension. I have updated the ini files so that I am reading the pagelayout.tpl from my extension directory.

For the curious, this is done by adding this to settings/siteaccess/<i>yoursiteaccess</i>/design.ini.append.php:
[ExtensionSettings]
DesignExtensions[]=<i>your extension name</i>

And adding this to settings/siteaccess/<i>yoursiteaccess</i>/site.ini.append.php:

[ExtensionSettings]
ActiveAccessExtensions[]=<i>your extension name</i>

[DesignSettings]
SiteDesign=<i>your extension name</i>
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=base

One thing that I am confused by, however, is how to generate URLs to my CSS and JS files . Normally, I would use ezdesign but that produces the relative URL /design/<i>design name</i>/javascript/<i>myjavascript.js</i>

Is there another template operator that I should be using?

Thanks,

Seth

Peter Keung

Monday 10 August 2009 12:49:13 pm

ezdesign() should still work. What it does is go through the SiteDesign and AdditionalSiteDesign paths to find the first matching file.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Seth Gottlieb

Monday 10 August 2009 1:07:46 pm

Thanks Peter! I think I figured out what happened. I didn't have the css file in the extension design so it must have fallen back to another design.

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

eZ debug

Timing: Jan 18 2025 15:52:55
Script start
Timing: Jan 18 2025 15:52:55
Module start 'layout'
Timing: Jan 18 2025 15:52:55
Module start 'content'
Timing: Jan 18 2025 15:52:56
Module end 'content'
Timing: Jan 18 2025 15:52:56
Script end

Main resources:

Total runtime0.6378 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 588.1563152.6563
Module start 'layout' 0.00420.0020 740.812539.4922
Module start 'content' 0.00620.6302 780.3047545.1875
Module end 'content' 0.63640.0013 1,325.492212.4375
Script end 0.6378  1,337.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4699160.0002
Check MTime0.00140.2155160.0001
Mysql Total
Database connection0.00060.091910.0006
Mysqli_queries0.594293.1664570.0104
Looping result0.00050.0733550.0000
Template Total0.615196.420.3075
Template load0.00160.249020.0008
Template processing0.613596.188620.3067
Template load and register function0.00010.012910.0001
states
state_id_array0.00120.189410.0012
state_identifier_array0.00080.130320.0004
Override
Cache load0.00130.2060260.0001
Sytem overhead
Fetch class attribute can translate value0.00040.068520.0002
Fetch class attribute name0.00110.173050.0002
XML
Image XML parsing0.00090.140320.0004
class_abstraction
Instantiating content class attribute0.00000.002060.0000
General
dbfile0.00090.1381230.0000
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs