[xwiki-users] TOC in a Panel
Hi, I'm new to xwiki and having a lot of trouble doing something that feels like it should be simple. All i'm wanting is to be able to display the {{toc}} macro of the current page on a side panel. Everything I find online seems to be from previous xwiki syntaxes and therefore out dated and not working. In fact it seems like most of the responses I see just say that such a thing is in development, but those were all posts from 2009. We would really like a setup like this that way users don't have to go through the trouble of creating a {{toc}} on every page, since one for the current page will always be shown in the panel. It seems like it would make a lot of sense if syntax like {{toc source=currentPage}} existed and was usable from a panel. It would open up a lot of possibilities. If anyone has any advice or recommendations I would greatly appreciate it. I've been digging through velocity code for the past week so I'm starting to get the hang of it but still a complete noob in that area. Thanks for the time! Sincerely,Craig
Hi. I'm new to Xwiki too, but what I can say is that I see just one possibility without recurring to programming. You can create a template and set the macro in it. Then everytime a user create an article, he would have 2 options: create a new page from scratch or create it from a template. That way they would have more freedom do select if they want TOC or not. =) 2014-03-07 17:24 GMT-03:00 craig barnett <[email protected]>:
Hi, I'm new to xwiki and having a lot of trouble doing something that feels like it should be simple. All i'm wanting is to be able to display the {{toc}} macro of the current page on a side panel. Everything I find online seems to be from previous xwiki syntaxes and therefore out dated and not working. In fact it seems like most of the responses I see just say that such a thing is in development, but those were all posts from 2009. We would really like a setup like this that way users don't have to go through the trouble of creating a {{toc}} on every page, since one for the current page will always be shown in the panel. It seems like it would make a lot of sense if syntax like {{toc source=currentPage}} existed and was usable from a panel. It would open up a lot of possibilities. If anyone has any advice or recommendations I would greatly appreciate it. I've been digging through velocity code for the past week so I'm starting to get the hang of it but still a complete noob in that area. Thanks for the time! Sincerely,Craig _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
The Developers of XWiki do know that this is something that users want to see in XWiki. Vincent Massol started a topic this year: Users-are-in-need-of-a-reusable-Tree-view-of-pages... <http://xwiki.475771.n2.nabble.com/Users-are-in-need-of-a-reusable-Tree-view-of-pages-what-can-we-do-td7588958.html> -- View this message in context: http://xwiki.475771.n2.nabble.com/TOC-in-a-Panel-tp7589479p7589481.html Sent from the XWiki- Users mailing list archive at Nabble.com.
This is something I have been working on...but it's far from perfect (it's more like a Proof Of Concept) It uses the Spoiler Macro and the TOC Macro. Put this at the top of a page: {{html wiki="true"}} <div id="menu"> {{spoiler title="TOC"}}{{toc depth="2"/}}{{/spoiler}} </div> {{/html}} And add this CSS to the page #menu { position: fixed; right: 0; top: 150px; padding-left: 5px; background-color: rgb(120,120,120); border-top-left-radius: 10px; border-bottom-left-radius: 10px; z-index:999; } -- View this message in context: http://xwiki.475771.n2.nabble.com/TOC-in-a-Panel-tp7589479p7589482.html Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (3)
-
craig barnett -
Hamster -
Leonardo Kodato