Forums / Setup & design / Design Extension and the ezdesign template operator

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.