Thread
Forum » Help / Editing pages » TOC and fold/unfold...
Started by: VoltaicLime VoltaicLime
Date: 24 Nov 2009 13:21
Number of posts: 11
rss icon RSS: New posts
TOC and fold/unfold...
VoltaicLime VoltaicLime 24 Nov 2009 13:21

Is there a way to create a table of contents using [[toc]] that starts folded?

by VoltaicLime VoltaicLime , 24 Nov 2009 13:21
Re: TOC and fold/unfold...
scottplan scottplan 24 Nov 2009 14:10

try collapsible blocks

by scottplan scottplan , 24 Nov 2009 14:10
Re: TOC and fold/unfold...

This will help
My test

for this to work you need to add the following to your custom CSS (you know how to do this?)

#toc#toc-action-bar{display:none}#toc.title{display:none;border:0pxsolidblack;}#toc{border:0pxsolidblack;margin:000 -1em;background-color:#ddf;}

A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.

by Steven Heynderickx Steven Heynderickx , 24 Nov 2009 15:51
Re: TOC and fold/unfold...
VoltaicLime VoltaicLime 24 Nov 2009 16:21

The collapsible block element worked better than fiddling with css to change the fold/unfold stuff. It looks cleaner as well. I just had to add some css to remove the toc.title and toc-action-bar. Thanks!

http://rpg-bestiary.wikidot.com/

Last edited on 25 Nov 2009 17:50 by VoltaicLime
by VoltaicLime VoltaicLime , 24 Nov 2009 16:21
I made a change... its a CSI now...

You don't need to implement it but tell me what you think of it
Thanks

BTW I can not see you source code


A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.

Last edited on 24 Nov 2009 16:43 by Steven Heynderickx
by Steven Heynderickx Steven Heynderickx , 24 Nov 2009 16:42
Re: I made a change... its a CSI now...
VoltaicLime VoltaicLime 25 Nov 2009 17:06

I have no idea what CSI's are, but I don't want to create extra pages to be included for each TOC I need.

by VoltaicLime VoltaicLime , 25 Nov 2009 17:06
Re: I made a change... its a CSI now...

did you have a look at my testpage?

because the only thing you need to do since I made it into a CSI Cross Site Include is to include the following code where you wish to have your [[toc]]

[[include :mycsi:include:folded-toc
title_open=Table of contents|
title_closed=Close Table of contents]]

So no extra pages

You may change "Table of contents" & "Close Table of contents" to what you wish maybe another language…


A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.

Last edited on 25 Nov 2009 17:45 by Steven Heynderickx
by Steven Heynderickx Steven Heynderickx , 25 Nov 2009 17:42
Re: I made a change... its a CSI now...
VoltaicLime VoltaicLime 25 Nov 2009 17:49

Yeah, I looked, but it wasn't what I wanted. I don't want to be reliant on another site either.

by VoltaicLime VoltaicLime , 25 Nov 2009 17:49
Re: I made a change... its a CSI now...
leiger leiger 26 Nov 2009 02:20

The http://csi.wikidot.com is a permanent site, with Wikidot CEO Pieter as the Master administrator. If Steven were to move his CSI there, you can rest assured that it will continue to work. Yes, you are reliant on another site, but at least it is the recommended site for all CSIs to be hosted at.

Or, if you really want to use your own site, just create a new page called include:folded-toc and add this code:

[[div class="foldedtoc" style="border:1px grey dashed;float:left;background-color:#ddf;margin:10px"]]
[[div style="margin:10px"]]
[[collapsible show="{$title_open}" hide="{$title_closed}"]]
[[toc]]
[[/collapsible]]
[[/div]]
[[/div]]

Then, on the page you want the TOC to be on, type this:

[[include include:folded-toc
title_open=Table of contents|
title_closed=Close Table of contents]]

You need to create the first page once only, then use the second codeblock for each TOC you have.


~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server

Last edited on 26 Nov 2009 02:21 by leiger
by leiger leiger , 26 Nov 2009 02:20
Re: TOC and fold/unfold...
zedbra zedbra 18 Jan 2016 23:17

How would I edit my CSS? Where do I go? I really like what you did with this.

by zedbra zedbra , 18 Jan 2016 23:17
Re: TOC and fold/unfold...
Helmut_pdorf Helmut_pdorf 19 Jan 2016 06:51

Have a look on our howto's : http://community.wikidot.com/system2:page-tags-howto/tag/css/category/howto


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?

by Helmut_pdorf Helmut_pdorf , 19 Jan 2016 06:51
/forum/t-199569/toc-and-fold-unfold#post-