[opencms-dev] (Info)Box with links - get current Link

patric dosch patric.dosch at virtual-identity.com
Wed Sep 21 09:21:27 CEST 2011


Hey Andreas,

 

you can read the current page org.opencms.file.CmsRequestContext.getUri() or getFolderUri 

-> cmsObject.getRequestContext().getFolderUri()

 

I always link to the folder and have the following helper method.

String curFilename = cms.getRequestContext().getUri();

return curFilename.endsWith("/index.html") ? cms.getRequestContext().getFolderUri() : curFilename;

 

If you are using Opencms 8, you can use: ${cms.requestContext.folderUri}

 

Regards, patric

 

Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Feuerstein Andreas
Gesendet: Mittwoch, 21. September 2011 09:11
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] (Info)Box with links - get current Link

 

Any ideas?


-----Ursprüngliche Nachricht-----
Von: opencms-dev-bounces at opencms.org im Auftrag von Feuerstein Andreas
Gesendet: So 18.09.2011 21:42
An: opencms-dev at opencms.org
Betreff: [opencms-dev] (Info)Box with links - get current Link

Hi,

I created an InfoBox containing a List of Links to OpenCms pages. It has a function like a navigation menu.

Assume it looks like this:

- Page 1
- Page 2
- Page 3

Is there any possibility to mark the current selected page in order to change its div class etc. to get something like this:

- Page 1
- Page 2 (current)
- Page 3

Best regards,
Andreas

_____________________________________________________________________
Vorstand: Ralf Heller, Udo Möbes
Vorsitzende des Aufsichtsrates: Kirsten Heller
Sitz der Gesellschaft: Gruenwaelderstrasse 10-14, D-79098 Freiburg
Amtsgericht Freiburg HRB 6218

Versand am 21.09.2011 09:21 von dosch patric
Validation-Code: 3043364275511

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110921/a6b5b8ad/attachment.htm>


More information about the opencms-dev mailing list