Sha256: 509f3166c31644cd5f2030628e635eb587927b22079c06f8c9803fb5e535f4ee
Contents?: true
Size: 1.63 KB
Versions: 8
Compression:
Stored size: 1.63 KB
Contents
--- title: Relocatable inMenu: true template: /plugin.template plugin: Tag/Relocatable --- h2(#description). Description This tag ensures that the relative path to the referenced file is always correct. It is used to change the directory part of the supplied path name and is most often used in template files. A relocatable tag looks like this: @\{relocatable: default.css}@. If this was put into a template and the template was used by a file in a subdirectory, then the @relocatable@ tag would put @../default.css@ into the output file; thus ensuring that the relative path to file is valid! However, if the specified path is an absolute URL, it will just return it. *Be aware* that the tag resolves the specified path by using the output names (and the <a href="{relocatable: ../file/pagehandler.page#pagename}">standardized page names</a>) of the nodes. Also, if the path points to a directory, the path to its index file is returned. Additionally, if you add an URL fragment to the path, it will also be checked if it exists. This can be turned off by setting the parameter {param: Tag/Relocatable:resolveFragment} to @false@. h2(#examples). Examples <table class="examples"> <tr> <th>Usage</th><th>Output</th> </tr> <tr> <td><notextile>\{relocatable: /default.css}</notextile></td> <td><notextile>{relocatable: /default.css}</notextile></td> </tr> <tr> <td><notextile>\{relocatable: ../core/configuration.page}</notextile></td> <td><notextile>{relocatable: ../core/configuration.page}</notextile></td> </tr> <tr> <td><notextile>\{relocatable: ../core}</notextile></td> <td><notextile>{relocatable: ../core}</notextile></td> </tr> </table>
Version data entries
8 entries across 8 versions & 1 rubygems