|Current maintainer :||Karl Heinz Kremer|
|Author(s) :||Karl Heinz Kremer|
|Recipe homepage :||Karl Heinz Kremer's Home Page|
|Compatible Genpage Versions|
relPath() only has one form.
Use relPath to convert an absolute path to a path relative to the current input file. This makes it possible to create a directory hirarchy that can be copied to any place without having to modify any paths referenced in any of he files.
This feature can be used e.g. when a personal home page hirarchy gets moved from one provider to another without having to adjust for any differences in the way the pages are stored.
If all images are stored in the directory /images then every HTML file can access every image by using the following command in the content file (or the template file):
$lt;!-- _GP_ relPath("/images/oneImage.gif") -->
If this command is used in the file content/one/two/three.content the path will be converted to ../../images/oneImage.gif.
Firstly, include the relPath.gp recipe by calling <-- _GP_ recipe("$root/include/relPath.gp") --> somewhere in the content, that can be either in one of the content files, or in the template file.
Every time this path relPath statement is found by genpage it will replace the absolute path with the (hopefully) correct relative path.