In a number of recent sites I have seen the use of hard coded physical server paths in XML arrtibutes such as the path="" in <folder> and <filesystem> nodes.
The problem with this approach is that whilst the code will operate perfectly on a development workstation by pointing to something beginning "c:\fx8build\web\....." it is unlikely this is th correct path in the test or live environments and to the system will immediately fal test on first deployment.
Best practive is to use the set of replacement values to ensure the correct path is addressed in each server deployment.
The following replacement values are supported in all config, map and point files:-
|
Replacement Value |
Meaning |
|---|---|
|
[path:content] |
The physical path to the root of the current site. eg: c:\fx8build\web\content\fx.mysite |
|
[path:theme] |
The physical path to the root of the current theme.
eg. c:\fx8build\web\conten\fx.mysite\themes\private |
|
[path:system] |
The physical path to the system folder. eg. c:\fx8build\web\system |
|
[path:root] |
The pysical path to the root of the web eg. x:\fx8build\web |
Thus a folder node may be configured as:
<folder id="blog-images" path="images\blogs" >
<sizes>
<size id="News Thumbnail" width="100" height="100" filetype="jpg" />
<size id="Fixed Height" width="auto" height="160" filetype="jpg" />
<size id="Panel Photo" width="160" height="160" filetype="jpg|png" />
</sizes>
</folder>
Note: All paths are resolved to INCLUDE the training "\".