mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
update to press release component of sample website
- adding sub navigation to press release page to generate navigation by category in xsl (demoware for virgin) - adding sub navigation to index.jsp to generate navigation by category (also demoware for virgin) - cleanup of freemarker template and all sorts of fancy xpath stuff - putting the company footer data type directly in the press release.xsd rather than having a seperate xsd. while this makes the form creation process a bit confusing, it demonstrates why the root element name field is there, and minimizes files. also forced me to clean up some major overloading of pr:company_footer. changes to form data functions - renamed getXMLDocument and getXMLDocuments to parseXMLDocument since it's now returning the document element rather than documents so that xpath traversal works (also since the document is completely useless in the context of templates) adding bsf.jar so that hopefully someday i can write extension functions in javascript within xsl templates (couldn't get it to work). git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4217 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -83,18 +83,25 @@ public abstract class AbstractRenderingEngine
|
||||
protected static String toAVMPath(final String parentAVMPath, final String path)
|
||||
{
|
||||
String parent = parentAVMPath;
|
||||
if (path != null && path.length() != 0 && path.charAt(0) == '/')
|
||||
if (path == null ||
|
||||
path.length() == 0 ||
|
||||
".".equals(path) ||
|
||||
"./".equals(path))
|
||||
{
|
||||
return parentAVMPath;
|
||||
}
|
||||
|
||||
if (path.charAt(0) == '/')
|
||||
{
|
||||
//XXXarielb this doesn't work with context paths for the website
|
||||
parent = parentAVMPath.substring(0,
|
||||
parentAVMPath.indexOf(':') +
|
||||
('/' + AVMConstants.DIR_APPBASE +
|
||||
'/' + AVMConstants.DIR_WEBAPPS).length() + 1);
|
||||
'/' + AVMConstants.DIR_WEBAPPS).length());
|
||||
}
|
||||
if (parent.endsWith("/"))
|
||||
{
|
||||
parent = parent.substring(0, parent.length() - 1);
|
||||
}
|
||||
final String result = parent + '/' + path;
|
||||
|
||||
final String result =
|
||||
parent + (parent.endsWith("/") || path.startsWith("/") ? path : '/' + path);
|
||||
LOGGER.debug("built full avmPath " + result +
|
||||
" for parent " + parentAVMPath +
|
||||
" and request path " + path);
|
||||
|
Reference in New Issue
Block a user