[opencms-dev] from folder to NavText

Christoph P. Kukulies kuku at physik.rwth-aachen.de
Tue May 23 17:45:58 CEST 2006


On Tue, May 23, 2006 at 05:13:07PM +0200, Pavel Peringer wrote:
> Christoph P. Kukulies napsal(a):
> 
> >Slight problem: How can I access (via getNavText()) the Navtext
> >when I have the folder f? I cannot cast CmsFolder to CmsJspNavElement.
> >
> >navtext=((CmsJspNavElement)f).getNavText();
> >
> >
> > 
> >
> You need initialized CmsObject. CmsFolder extends CmsResource.

Can you send me this in a more readable form (as program code),please?:

> String navtext = cmsObject.|*readPropertyObject 
> <../../../org/opencms/file/CmsObject.html#readPropertyObject%28org.opencms.file.CmsResource,%20java.lang.String,%20boolean%29>*(f, 
> |CmsPropertyDefinition.|*PROPERTY_NAVTEXT 
> <../../../org/opencms/file/CmsPropertyDefinition.html#PROPERTY_NAVTEXT>*||, 
> false)|.|*getValue 
> <../../../org/opencms/file/CmsProperty.html#getValue%28%29>*();
> or in case no navtext is found
> |String navtext = cmsObject.|*readPropertyObject 
> <../../../org/opencms/file/CmsObject.html#readPropertyObject%28org.opencms.file.CmsResource,%20java.lang.String,%20boolean%29>*(f, 
> |CmsPropertyDefinition.|*PROPERTY_NAVTEXT 
> <../../../org/opencms/file/CmsPropertyDefinition.html#PROPERTY_NAVTEXT>*||, 
> false)|.|*getValue 
> <../../../org/opencms/file/CmsProperty.html#getValue%28%29>*("predefined 
> navtext");|
> 
> HTH

What are all these vertical bars doing? I could try to decipher the
%hexcodes. Was it cut/pasted out of a web page or what?


--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de



More information about the opencms-dev mailing list