Wednesday 30 June 2010 8:16:52 am
This is something that had really surprised me when I started using eZ Publish: A CMS as complex and advanced as this uses absolute paths and URLs? I could not believe it initially. The paths/URLs I am talking about are things like the SiteURL setting, or AdditionalLoginFormActionURL, but also paths to for example images in an extension. eZ Publish is the first CMS I encounter that I can not move around freely. Usually, a CMS would internally use relative paths, like "../img/header.jpg" instead of for example "/img/header.jpg", which expects the folder "img" in the web root. With paths relative to the CMS root folder or maybe also an extension's root folder, it would not matter whether I install eZ in the web root, in the folder "/CMS" or in "/sites/ezp". With current shared hosting solutions it is very common to map a folder to a subdomain in DNS and install a site inside that folder. the CMS inside that folder should usually not need to know what domain it is serving, as long as everything it does is based on its own root directory. I could map the installation folder to "my.example.com", but it would not matter, because the CMS would only add "/eng/Hello" for the welcome page to whatever URL I use to access it, be it "my.example.com" or "example.com/sites/ezp". I could map it to "your.example.com" and the URL would become "your.example.com/eng/Hello" - or still "example.com/sites/ezp/eng/Hello", depending on how I access it. I admit that this could perhaps cause trouble for multisite setups - I don't know, I never did that, I only think it might. But even if things like SiteURL can (for whatever reason) not be changed, would it perhaps be possible to establish guidelines for extension authors to use relative paths instead of absolute ones?
|