[opencms-dev] Include link.week unique key

Michael Moossen m.moossen at alkacon.com
Mon Apr 21 14:16:19 CEST 2008


Hi,

The idea of the link macro is to prevent broken links after moving or 
renaming a file.

without the link macro, if you move the nav_left.jsp. your code will not 
work anymore, with the link macro your code will still work after moving 
files around.

and you do not need to write the id, you just need to write 
%(link:../nav_left.jsp)

and when saving the file OpenCms will automatically convert it. 
resulting in the absolute path plus the id. ie. something like:
(link.weak:/system/modules/org.tem..../nav_left.jsp:ee1ea4f4-d97c-11dc-bc65-3bdd2ea0b1ac)

for more info, come to hear me at the OpenCms Days 2008:
http://www.opencms-days.org/en/program/sessions/t2.html

Kind regards,
Michael

-------------------

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org


spideyh2003 wrote:
> Hello,
> 
> I don't understand this new "%(" syntax together with the "link.weak"
> parameters ..please help.  Do you have any resource how to use this new
> syntax?
> 
> Thanks
> 
> 
> 
> Manfred Roos wrote:
>> Hallo,
>>
>> in the templatetwo examples you can find code lines like
>>     <cms:include 
>> file="(link.weak:/system/modules/org.tem..../nav_left.jsp:ee1ea4f4-d97c-11dc-bc65-3bdd2ea0b1ac)"
>> />
>>
>> So there is a hardcoded number/key (ee1ea4f4-d97c-11dc-bc65-3bdd2ea0b1ac)
>> after the filename 'nav_left.jsp'.
>>
>> Well, if I want to use my own navigation.jsp where can I find this
>> number/key which I have to use?
>>
>> If  it is a unique key from the database, please note the tablename.
>>
>> Regards
>> Manfred 
>>
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
> 



More information about the opencms-dev mailing list