- Added the name/URL stub of a category to the XML output
- The template parser of Foundry now uses the name attribute for creating the path of the current category to determine if there is special layout template for a category git-svn-id: https://svn.libreccm.org/ccm/trunk@3089 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
03a494498c
commit
243b62082c
|
|
@ -912,7 +912,7 @@
|
|||
</foundry:doc-result>
|
||||
</foundry:doc>
|
||||
<xsl:function name="foundry:read-current-category">
|
||||
<xsl:sequence select="string-join($data-tree/nav:categoryPath/nav:category/@title, '/')"/>
|
||||
<xsl:sequence select="string-join($data-tree/nav:categoryPath/nav:category/@name, '/')"/>
|
||||
</xsl:function>
|
||||
|
||||
<xsl:function name="foundry:shying" as="xs:string">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package com.arsdigita.navigation.ui;
|
||||
|
||||
import com.arsdigita.navigation.Navigation;
|
||||
|
|
@ -42,6 +41,7 @@ public abstract class CategoryComponent extends AbstractComponent {
|
|||
response,
|
||||
category.getID(),
|
||||
category.getName(),
|
||||
category.getURL(),
|
||||
category.getDescription(),
|
||||
locateCategory(category));
|
||||
}
|
||||
|
|
@ -50,17 +50,24 @@ public abstract class CategoryComponent extends AbstractComponent {
|
|||
HttpServletResponse response,
|
||||
BigDecimal id,
|
||||
String title,
|
||||
String urlStub,
|
||||
String description,
|
||||
String url) {
|
||||
Element content = Navigation.newElement("category");
|
||||
content.addAttribute("id", XML.format(id));
|
||||
content.addAttribute("title", title);
|
||||
if (urlStub == null || urlStub.isEmpty()) {
|
||||
content.addAttribute("name", title);
|
||||
} else {
|
||||
content.addAttribute("name", urlStub);
|
||||
}
|
||||
content.addAttribute("description", description);
|
||||
content.addAttribute("url", url);
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
protected String locateCategory(Category cat) {
|
||||
return Navigation.redirectURL(cat.getOID());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ public abstract class AbstractTree extends CategoryComponent {
|
|||
response,
|
||||
cat.getID(),
|
||||
cat.getName(),
|
||||
cat.getURL(),
|
||||
cat.getDescription(),
|
||||
concatURLs ? path : Navigation.redirectURL(cat.getOID()));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue