<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Arial Unicode MS";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@Arial Unicode MS";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="#0563C1" vlink="#954F72">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>maybe i've misunderstood your approach, but why do you need links? i'd build a xml scheme linke this:</p>
<p><br>
</p>
<p><span><xsd:element name="externalResourceLanguage" type="OpenCmsString" /></span><br>
</p>
<p><span><span><xsd:element name="externalResourcePool" type="OpenCmsString" /></span><br>
</span></p>
<p><span><span><span><xsd:element name="externalResourceIdentifier" type="OpenCmsString" /></span><br>
</span></span></p>
<p><span><span><span><br>
</span></span></span></p>
<p><span><span><span><span><layout element="<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">e</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">x</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">ternalResourceLanguage</span>"
 widget="SelectorWidget" configuration="en | klyngon | l33t | whatever" /></span><br>
</span></span></span></p>
<p><span><span><span><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><layout element="</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">externalResourcePool</span></span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"></span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">"
 widget="SelectorWidget" configuration="</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">people | dogs | cats |
 penguins</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">" /></span><br>
</span></span></span></span></p>
<p><span><span><span><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><br>
</span></span></span></span></span></p>
<p><span><span><span><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">and based on this i'd "manufacture" the link
 in the template. of course it's a little more work for your editors, but you get rid of the whole dummy folders and files.</span></span></span></span></span></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> opencms-dev-bounces@opencms.org <opencms-dev-bounces@opencms.org> im Auftrag von Paul-Inge Flakstad <flakstad@npolar.no><br>
<b>Gesendet:</b> Freitag, 2. Dezember 2016 10:40:21<br>
<b>An:</b> The OpenCms mailing list<br>
<b>Betreff:</b> [opencms-dev] Allow links to non-existing resources</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Our OpenCms site integrates some externally stored content – for example, person details (name, email, phone, etc.). I'll use this example to explain.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Each person page has a unique, human-friendly URI, like "/en/people/jane.doe/".
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Up until now, we've employed one dummy folder + index file in the VFS for every person. These are just empty resources; all the magic happens in the index file's template, which uses the ID found in the URI (e.g. "jane.doe")
 to fetch the externally stored content and render the page. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This approach works great with respect to the internal workings of OpenCms, but it's not very efficient. In an attempt to remedy that, I decided to write a resource initializer for requests to stuff inside the "/en/people/"
 folder. It works great. All our person URIs work – they are in fact unchanged – with only the folder "/en/people/" existing in the VFS.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Finally we can get rid of those unnecessary dummy resources!
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">...there's just this tiiiny little problem...
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Links won't work anymore(!!!). At least not link fields in xmlcontent – imagine f.ex. a dedicated field called "Author" or "Contact person".<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Naturally, once all the dummy stuff is gone, adding a link to "/en/people/######" will produce an error. "Invalid reference, the resource can not be found." And it's correct, of course; the ###### resource doesn't exist
 in the VFS. I'd still like to save the link, though.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Is there a way to circumvent this problem? Or am I forced to handle the issue another way? (I have good ideas on how to, but they would require modifying all existing links – and we have thousands of pages...)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks in advance,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Paul</span><span lang="EN-US" style="font-size:8.0pt;color:#2E74B5;mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</div>
<br>
<br>
<br>
<div style="font-size: 13px; font-family: sans-serif;">Lorenz Lammersdorf</div>
<div style="font-size: 11px; font-family: sans-serif;">Entwickler<br>
+41 58 255 13 06</div>
<br>
<div style="font-size: 11px; font-family: sans-serif;">Aktuell im Blog: <a href="http://mensch-marke.info/social-media-b2b-gruende/">
Social Media im B2B: Eine grosse Chance für Ihr Unternehmen</a> <br>
<br>
Kernbrand AG<br>
Teufener Strasse 11<br>
9000 St. Gallen<br>
<a href="https://kernbrand.ch">www.kernbrand.ch</a> <br>
<br>
Folgen Sie uns: <a href="http://bit.ly/Kernbrand_Facebook">Facebook</a> | <a href="http://bit.ly/Kernbrand_Pinterest">Pinterest</a> | <a href="http://bit.ly/Kernbrand_LinkedIn1">LinkedIn</a> | <a href="http://bit.ly/Kernbrand_Twitter">Twitter</a> | <a href="http://bit.ly/Kernbrand_Youtube">Youtube</a>
</div>
</body>
</html>