[opencms-dev] Question about getCacheDirectives()
Michael Schmitt
mi.schmitt at gmx.de
Fri Nov 7 13:22:01 CET 2003
Hi all,
I have got a problem accessing parameters defined in an element definition
from inside the method getCacheDirectives().
In one of my Xml-files I have got something like
...
<ELEMENTDEF name="empfehlungen">
<CLASS>de.popfrontal.opencms.templates.MyTemplate</CLASS>
<TEMPLATE>/system/modules/..../elements/mytemplate</TEMPLATE>
<PARAMETER name="someparam">xxx</PARAMETER>
</ELEMENTDEF>
...
The class looks like:
public class MyTemplate extends CmsXmlTemplate{
...
public byte[] getContent(..., String elementName, Hashtable parameters,
...){
...
}
public CmsCacheDirectives getCacheDirectives(...){
....
}
}
Now, I am trying to access the parameter in the definition.
When doing this inside the method getContent() I am able to read
the parameter by calling:
String param = (String)parameters.get(elementName + ".someparam");
When I try doing the same thing inside of getCacheDirectives() two problems
arise:
1. the passed elementName seems to be always NULL,
2. the parameters Hashtable does not even contain the element definitions
parameter.
Does anyone no a way of accessing the definition parameter from the method
getCacheDirectives() ???
best regards,
michael
More information about the opencms-dev
mailing list