General Actions:
| Question | Can you create a page pointing to all pages with a certain property value? |
| Answer |
I figured out that it's possible to do this using velocity script:
* Get a list of documents using \$xwiki.searchDocuments(). This returns a list of document names in string format, not a list of document objects. * Iterate through the list using a \#foreach statement. For each result: ** use \$xwiki.getDocument($docname) to obtain the document object ** Then use the document.getObject(\$objectname) function to obtain the object you're interested in ** Finally use object.getProperty(\$propname).getValue() to obtain the value of the desired property, and use this to determine whether this document meets your criteria |