Hi,<div><br></div><div>I change code CmsXmlVarLinkValue.java OpenCms 8.0.4, two improvement:</div><div><div>Improvement:</div><div><div>                if(path.startsWith("/")){</div><div>                    // get the root path</div>
<div>                <span class="Apple-tab-span" style="white-space:pre">      </span>path = OpenCms.getLinkManager().getRootPath(cms, path);</div><div>                }</div></div><div>And improvement:</div><div>boolean internal = true;</div>
<div>        if(!(path != null && path.startsWith("/"))){</div><div>        <span class="Apple-tab-span" style="white-space:pre"> </span>internal = false;</div><div>        }</div><div><br></div><div>Only internal link start with "/", else this is link external!</div>
<div><br></div><div>I have problem with multisite, two projects, sitea and siteb in one opencms, and sitea link for siteb...</div><div><br></div><div class="gmail_quote">2013/5/27 Deiverson Silveira <span dir="ltr"><<a href="mailto:deiverson@solutioncms.com" target="_blank">deiverson@solutioncms.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><h1 style="font-family:'Times New Roman'"><font>Hi List / Mathias,</font></h1><div>I have some problem, I think custom OpenCmsVarLink for resolved this, if field contains http or www, define internal with false... I go with this way...</div>

<h1 style="font-family:'Times New Roman'">[opencms-dev] OpenCmsVarLink: always converts absolute url to relative url</h1><b style="font-family:'Times New Roman';font-size:medium">Mathias Lin</b><span style="font-size:medium;font-family:'Times New Roman'"> </span><a href="mailto:opencms-dev%40opencms.org?Subject=Re%3A%20%5Bopencms-dev%5D%20OpenCmsVarLink%3A%20always%20converts%20absolute%20url%20to%0A%09relative%20url&In-Reply-To=%3CCAJHXjFWL1juPz4bOg-XL%3DZQvJCTgTBcf4vWC_FH-39g-CukstQ%40mail.gmail.com%3E" title="[opencms-dev] OpenCmsVarLink: always converts absolute url to     relative url" style="font-family:'Times New Roman';font-size:medium" target="_blank">mail at mathiaslin.com </a><br style="font-family:'Times New Roman';font-size:medium">

<i style="font-family:'Times New Roman';font-size:medium">Wed Jan 9 04:40:38 CET 2013</i><span style="font-size:medium;font-family:'Times New Roman'"></span><p style="font-family:'Times New Roman';font-size:medium">

</p><ul style="font-family:'Times New Roman';font-size:medium"><li>Previous message: <a href="http://lists.opencms.org/pipermail/opencms-dev/2013q1/037832.html" target="_blank">[opencms-dev] More Test: Possible bug in 8.0.4 for rename folder upper case...</a></li>

<li>Next message: <a href="http://lists.opencms.org/pipermail/opencms-dev/2013q1/037833.html" target="_blank">[opencms-dev] OAMP Survey 2.0.1</a></li><li><b>Messages sorted by:</b> <a href="http://lists.opencms.org/pipermail/opencms-dev/2013q1/date.html#37830" target="_blank">[ date ]</a> <a href="http://lists.opencms.org/pipermail/opencms-dev/2013q1/thread.html#37830" target="_blank">[ thread ]</a> <a href="http://lists.opencms.org/pipermail/opencms-dev/2013q1/subject.html#37830" target="_blank">[ subject ]</a> <a href="http://lists.opencms.org/pipermail/opencms-dev/2013q1/author.html#37830" target="_blank">[ author ]</a></li>

</ul><hr style="font-family:'Times New Roman';font-size:medium"><pre style="white-space:pre-wrap">In a structured content, I have a field of type OpenCmsVarLink.

When I edit an instance of it, I can enter absolute urls (from remote
servers) or relative urls into this field.

But I found that when I enter an absolute url that points to the same
OpenCms server/site, OpenCms will always convert the absolute url I entered
to a relative url.

How can this be avoided?

Because in some cases, I want to link to a pdf via absolute url and don't
want this pdf to be served the static export, while still I don't want to
disable static export for all pdfs in general.

Why does OpenCms do this conversion anyway? If I'd like to let it be
handled by OpenCms, I'd enter the relative url only and not an absolute url.

Anway way to force it via property?</pre><span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><i><div><span style="font-style:normal"><i><div><span style="font-style:normal"><i><div style="display:inline!important">
<span style="font-style:normal"><i><a href="http://www.solutioncms.com" target="_blank">www.solutioncms.com</a></i></span></div>
</i></span></div><div><span style="font-style:normal"><i><span style="font-style:normal"><i><div><span style="font-style:normal"><i><div style="display:inline!important"><span style="font-style:normal"><i><span style="font-style:normal"><i><div style="display:inline!important">

<i>The Brazilian </i><span style="font-style:normal"><i><div style="display:inline!important"><span style="font-style:normal"><i><span style="font-style:normal"><i><div style="display:inline!important"><i>Official Provider OpenCms</i></div>

</i></span></i></span></div></i></span></div></i></span></i></span></div></i></span></div></i></span></i></span></div></i></span></div></i>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><i><div><span style="font-style:normal"><i><div><span style="font-style:normal"><i><div style="display:inline!important"><span style="font-style:normal"><i><a href="http://www.solutioncms.com" target="_blank">www.solutioncms.com</a></i></span></div>
</i></span></div><div><span style="font-style:normal"><i><span style="font-style:normal"><i><div><span style="font-style:normal"><i><div style="display:inline!important"><span style="font-style:normal"><i><span style="font-style:normal"><i><div style="display:inline!important">
<i>The Brazilian </i><span style="font-style:normal"><i><div style="display:inline!important"><span style="font-style:normal"><i><span style="font-style:normal"><i><div style="display:inline!important"><i>Official Provider OpenCms</i></div>
</i></span></i></span></div></i></span></div></i></span></i></span></div></i></span></div></i></span></i></span></div></i></span></div></i>
</div>