08-31-2011 08:07 AM
08-31-2011 09:03 AM
<bean id="wcmquickstartmodule_sectionPathContextParser"
parent="wcmquickstartmodule_contextParser"
class="org.alfresco.module.org_alfresco_module_wcmquickstart.util.contextparser.SectionPathContextParser">
<property name="name" value="section" />
</bean>
Note the reference to the parent bean: "wcmquickstartmodule_contextParser". Also note the value of the name property of this bean: "section" - by default this is used as the key that ties your parser to a particular placeholder (although this is overridden by this particular parser).08-31-2011 11:37 AM
package org.alfresco.module.org_alfresco_module_wcmquickstart.util.contextparser;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeRef;
public class SectionNameContextParser extends ContextParser
{
@Override
public String execute(NodeRef context)
{
String result = null;
NodeRef nodeRef = siteHelper.getRelevantSection(context);
if (nodeRef != null)
{
String nodeName = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
result = nodeName;
}
return result;
}
}
08-31-2011 11:40 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.