Hi everyone!
How can I embed a list of subpages of any wiki page into another one, in a way that exports to PDF? I know about the “documentTree” Macro, but it does not work for PDF export as it seems to be dynamically generated, and I can’t use it inline with a velocity script.
My situation is this:
I have a number of pages starting with the same prefix. All of these pages have a subpage, starting with another defined prefix, but the rest of the title is the same. I’d like to reuse the same code for all pages, so I want to build the references on the fly. I know how to work with strings, so the first shouldn’t be a problem, but the document references give me headaches.
Now what I want is to display a list of the subpages of a subpage of the main page .
E.g. I have this structure:
- Prefix My Page
- PrefixLong My Page
- Subpage 1
- Subpage 2
- etc.
- PrefixLong My Page
Inside of “Prefix My Page” I want to display the subpages of “PrefixLong MyPage” dynamically, I’d say with a velocity script. The best thing would be if I wouldn’t have to enter one static page name, but build the strings on the fly. So from “Prefix My Page” I can extract “My Page” and build the name of the Subpage, “PrefixLong My Page”.
And the whole thing should be exportable to PDF.
Can anyone please point me to the right direction? I’m not very familiar with velocity and XWiki yet (though the API is mighty!)
Thanks for any help.