View Source
| Name | ops-spacelist-by-label |
|---|---|
| Version | 1.0 |
| Product Versions | 2.8 |
| Author(s) | Stefan Baader |
| Homepage | |
| Price | Free |
| License | n/a |
| JavaDocs | n/a |
| IssueTracking | n/a |
| Download JAR | n/a |
| Download Source | see below |
Description/Features
List all Spaces (Name and Link) by a defined space label (if exists).
This User Macro creates an unordered list with all spaces containing a defined label. Usage in pages and ThemeBuilder menus.
Installation
Go to your Administration area / User Macros and create a new user macro called "ops-spacelist-by-label". Copy and paste the following code:
## List all Spaces by a defined label
## Author: Stefan Baader
## 29.8.2008
## {ops-spacelist-by-label:dog}
#set($labelmanager=$action.getLabelManager())
#set($label=$labelmanager.getLabel($param0) )
#if($label)
#set($spaces=$labelmanager.getSpacesWithLabel($label) )
#foreach( $space in $spaces)
<li><a href="$req.contextPath$space.getUrlPath()">$space.getName()</a> <br>
#end
#else
No label found called $param0
#end
Usage
{ops-spacelist-by-label:labelname}
Examples
{ops-spacelist-by-label:dog}
{wikimenu}{ops-spacelist-by-label:employees}{wikimenu}
