Index: main/plugin-web/src/org/ametys/web/transformation/xslt/AmetysXSLTHelper.java =================================================================== --- main/plugin-web/src/org/ametys/web/transformation/xslt/AmetysXSLTHelper.java (revision 30917) +++ main/plugin-web/src/org/ametys/web/transformation/xslt/AmetysXSLTHelper.java (working copy) @@ -43,6 +43,7 @@ import org.xml.sax.SAXException; import org.ametys.cms.repository.Content; +import org.ametys.plugins.blog.repository.VirtualTagsPage; import org.ametys.plugins.explorer.resources.Resource; import org.ametys.plugins.explorer.resources.ResourceCollection; import org.ametys.plugins.explorer.resources.dom.ResourceCollectionElement; @@ -987,6 +988,32 @@ } /** + * Get the path of a tag. The path contains the tag's parents seprated by '/'. + * @param siteName The site name + * @param tagName The unique tag's name + * @return The tag's path or empty string if tag does not exist + */ + public static String tagPath (String siteName, String tagName) + { + Tag tag = _tagProviderExtPt.getTag(siteName, tagName); + if (tag == null) + { + return StringUtils.EMPTY; + } + + String path = tagName; + + Tag parentTag = tag.getParent(); + while (parentTag != null) + { + path = parentTag.getName() + "/" + path; + parentTag = parentTag.getParent(); + } + + return path; + } + + /** * Get the label of a tag * @param siteName the current site * @param tagName the name of the tag