Cookie-less domain for storage directory

Author Message

Rebecca Denham

Thursday 24 June 2010 8:14:59 am

Hello,

I am currently using ez 4.30 on Ubuntu 10.04. I would like to have the accesses to the storage directory to be via a cookie-less domain. So for example, if my eZ domain is www.example.com, all content would be served from this domain. But within eZ, I would like to specify that all references to images and other storage items be served from another domain. Is this possible?

Gaetano Giunta

Thursday 24 June 2010 9:11:52 am

1- You could create a new template operator that returns the hostname used for accessing design elements, and use it like this:

<img src="{imagehost()}{'myimage'|ezimage(no)}"/>

the downside of this approach is that it only work for new templates, not all the existing ones

1b- the same could be done with a single new template operator

<img src="{'myimage'|myezimage(no)}"/>

2- you could alter the existing ezdesign() and ezimage() template operators, but, afaict, that would be considered a 'hack' as there is no support to rewrite existing template operators except swapping the php class that implement them via the autoload mechanism

3- using a filter that is run on the complete page html after template rendering (look at xrowcdn extension for an example)

Principal Consultant International Business
Member of the Community Project Board

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