[opencms-dev] when links are moving

Mathias Lin | SYSVISION mail at mathiaslin.com
Fri Jun 12 07:42:24 CEST 2009


I am wondering, what is the purpose of the "target" tag in an URI? 
Like in this example, where the attachment is part of a structured content
element, let's say the file is named test.html:

<Attachment>
      <URI>
        <link internal="true" type="WEAK">
         
<target><![CDATA[/sites/com.company.www/_test/downloads/abc.pdf]]></target>
          <uuid>072408c8-4dcd-11de-a07e-00304895511a</uuid>
        </link>
      </URI>
</Attachment>

It seems that the path to the document isn't actually read from the value of
the "target" tag but looked up from somewhere else using the UUID as
parameter?

Because I found that when I move the abc.pdf to another folder, the value in
the "target" tag of the attachment in my test.html is not updated
automatically. But when I open the test.html in the browser and have the
attachment being displayed, the link is displayed correctly.

For example, if I would move the abc.pdf up one folder level and out of the
downloads folder to /sites/com.company.www/_test/abc.pdf, the target value
in my test.html control code still remains
/sites/com.company.www/_test/downloads/abc.pdf, but when viewing the page in
the browser, it will link to the abc.pdf correctly with
/sites/com.company.www/_test/abc.pdf
(Only when I would open test.html in the editor, then save, the target value
would update to the right URL).

So actually everything works fine here, but I am just wondering about the
purpose of the "target" tag then? I also found that I cannot edit the target
value in the control code - when I do, it will always be reverted to the
previous value after I save.




Paul-Inge Flakstad wrote:
> 
> Hi again
> 
> You are right in that the href will need to contain the actual path to the
> target resource, I think a javascript reference will screw things up
> (because OpenCms will not know be able to tell which resource is
> referenced).
> 
> Linking to the online-project could also be a problem, although I cannot
> say for certain.
> 
> I hope you figure it out, and please post it to the list if you do. Always
> good for future reference. :-)
> 
> Cheers,
> Paul
> 
>> -----Original Message-----
>> From: Christoph P. Kukulies [mailto:kuku at physik.rwth-aachen.de] 
>> Sent: 5. juni 2009 15:06
>> To: Paul-Inge Flakstad
>> Subject: Re: [opencms-dev] when links are moving
>> 
>> Hi Paul,
>> 
>> thanks for replying. Actually, I was initially thinking that 
>> this worked
>> automatically with OpenCms. But in that particular case - maybe it's
>> also because something was screwed up - a couple of references, where
>> normally a href tag should contain something meaningful - these tags
>> were corrupted in that they contained a javascript(0) /* 
>> 123467128354124 */
>> 
>> We had a VFS-folder marked as not-for-publishing and it could be that
>> there were links between resources there and the online-project. 
>> Difficult to reconstruct now bute if I stumble across such a 
>> case again
>> I will try to cellect some more information.
>> 
>> 
>> --
>> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
>> On Fri, Jun 05, 2009 at 10:49:20AM +0200, Paul-Inge Flakstad wrote:
>> > Hi Cristoph
>> > 
>> > In my experience, the links actually do get changed automatically. 
>> > 
>> > I'm not sure if this is true _always_, but when an image 
>> file is referenced by path (using the VFS resource widget) 
>> inside a structured content file, the path gets updated when 
>> moving that image around. Also, we use structured content for 
>> navigation, and it's the same here; link paths gets updated 
>> automatically when moving files around.
>> > 
>> > With regards to versions, I'm uncertain whether there are 
>> differences in the (recent) releases. We run mostly 
>> 7.0.3-7.0.5 (many servers) and AFAIK the feature works fine 
>> in these versions.
>> > 
>> > If this is not true in your case, please try to explain the 
>> specific situations where it does not work.
>> > 
>> > Cheers,
>> > Paul
>> > 
>> > > -----Original Message-----
>> > > From: opencms-dev-bounces at opencms.org 
>> > > [mailto:opencms-dev-bounces at opencms.org] On Behalf Of 
>> > > Christoph P. Kukulies
>> > > Sent: 5. juni 2009 09:43
>> > > To: opencms-dev at opencms.org
>> > > Subject: [opencms-dev] when links are moving
>> > > 
>> > > When objects (e.g. /galleries/*.gif) that are referenced 
>> by pages are
>> > > moved around in the VFS, is the a way OpenCms can track 
>> it and change
>> > > the links automatically? It was to me there had been such 
>> a feature
>> > > or is it in the upcoming 7.5?
>> > > Or doesn't it exist at all and doesn't make sense for 
>> whatever reason?
>> > > 
>> > > 
>> > > --
>> > > Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
>> 
> 
> 


-----
Mathias Lin
SYSVISION Ltd., China
http://www.sysvision.com
-- 
View this message in context: http://www.nabble.com/when-links-are-moving-tp23883650p23993179.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.




More information about the opencms-dev mailing list