Relative paths to site root instead of current document

Ivan's Avatar

Ivan

27 Jul, 2010 06:32 PM

The cascade system automatically resolves indexed <path> values to pages and creates relative links to the published document, when used in context of <a href="{path}>. Is there a way for it to produce a link relative to the site root?

For example, when /1/2/3/out.html is published with a link to /a/b/c/page.html, the result of <a href="{path}"> will become "../../../a/b/c/page.html"

I would like for it to instead, produce a link in form of "/a/b/c/page.html"

  1. 1 Posted by Ivan on 27 Jul, 2010 06:33 PM

    Ivan's Avatar

    Mistake on post section, please move to appropriate one

  2. 2 Posted by Ross on 30 Jul, 2010 08:47 PM

    Ross's Avatar

    Producing site-root-relative links is controlled on a page-by-page basis. On the System pane of a Page, you'll find a checkbox labeled “Maintain absolute links when publishing”. Turning that on will cause all links to be written out in the form you want.

    Because this setting is available only on individual pages, there is no way to enforce it site-wide. If you want it to be the default, however, you can turn it on for the Base Assets of your Asset Factories. All assets created using the New menu will have the option enabled.

  3. Tim closed this discussion on 03 Aug, 2010 04:51 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac