Hello in confluence you have an option to make Table of content items inline. Has Xwiki TOC macro some options or i can get it only with html/css code?
What exactly do you mean by “inline” ?
XWIKI TOC inline by css
inline TOC in confluence
So indeed the TOC macro does not even support being inserted in an inline context right now and always produce a list block (so a <ul>
).
Ok I think what you mean is the “flat list” option of Confluence. How does it work when you have nested headings? A screenshot would be nice. Maybe it only supports a single level (I see it says 2 for max levels though).
May I ask what is your use case for a “flat list” option?
Thx
Hello, here is more informative example:
ok thanks. I see no visual difference between the levels in the flat list.
You didn’t mention what’s your need for this.
This looks pretty easy to support in the toc macro (in inline context for example), but like @vmassol I find it hard to use such an inline list without any kind of clue regarding the hierarchy.
Some time i write page with a lot of headings. Such as changelog or brief notes and in this case my TOC can fit more than 1/2 of screen.
Another way to use flat TOC when you have a compact page with 2-3 short headers based on the same level. In this case, you can get a more compact view.
Third case is the place TOC in the end of the page.
I can do flat TOC use html and css, but i think not all people know how to use it.
In this case having a flat toc won’t help IMO, it’s just make something unreadable even if flat and you won’t see the nested levels either… What’s the problem with 1/2 of the screen? Would a collapsible TOC be better (where you see the beginning and a “more…” button to see beyond the first, say, 5-10 items)?
I don’t really see what you win by this. Maybe some real life example would help. I’m asking all this because it’s the first time in 15 years that I hear about this need so I’m curious to see if there’s a real use case for it and whether or not we should support that (right now, the use cases seem on the light side to me but I could be wrong ;)).
Thx!
Wouldn’t a side toc be better in such a case, that’s usually what we do when the toc become too big. See for example https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/. This example is done with:
{{box cssClass="floatinginfobox" title="**Contents**"}}
{{toc/}}
{{/box}}
Thank you, it nice idea for some cases!
Ok, may be you right. And flat TOC out the box not need to oher users.
You and your teammates make a great and flexible opensource instrument and my case a not huge problem.
Because i can fix this problem some diffrent ways
I can use simple CSS and HTML.
Or i can make my own macro where i’ll wrap TOC by CSS / HTML and reuse it.
I even can make my fork of TOC macro and put it in repository.
And people who can’t do the same, may go back to Confluence
Xwiki full screen
Confluence full screen
Meme
I have a similar usecase as you with a very very long TOC.
Here is what I do:
{{box cssClass="box floatinginfobox" title="**Quick Links**"}}
{{toc start="2" depth="5" numbered="true"/}}
{{/box}}
The box causes the TOC to float to the right, and my content will appear on the left and will not waste any space.
Also, consider adding different header levels, such as:
(written as html for clarity)
<h2>v1</h2>
<h3>v1.1</h3>
<h3>v1.2</h3>
<h2>v2.x</h2>
<h3>v2.1</h3>
<h3>etc...</h3>
This way, rather than having one large list, there will be indentation levels which will make it much easier visually to scan down the TOC and will be certainly easier to navigate than one monster flattened list, like so:
quick links
- v1.x
1.1. v1.1
1.1. v1.2- v2.x
1.1. v2.x
1.1. etc…
Yes, I also see the value for a flattened list, such as when I have alphabetized headings, but in this case I prefer the hierarchical list for the version numbers.
That’s just my opinion.
Thanks!
oh no, not that
Correct.
Idea for you: You could even use the Release Note app that I started developing some years ago and that I use on xwiki.org:
- https://extensions.xwiki.org/xwiki/bin/view/Extension/Release%20Notes%20Application/
- Example on xwiki.org: https://www.xwiki.org/xwiki/bin/view/ReleaseNotes/
It’s also simple to develop a very simple custom version of it if you need, using AWM (takes 5 mn to do a first functioning version without any dev knowledge of XWiki).