heiko-barth.de

// DokuWiki: TOC automatisch einklappen

DokuWiki bietet von Hause aus leider keine Möglichkeit, den TOC einer bestimmten Seite automatisch eingeklappt (collapsed) anzuzeigen. Standardmäßig ist der TOC ausgeklappt.

Mit folgendem Quick & Dirty Hack kann man dies pro Seite aktivieren:

<html>
	<script>
		// collapse TOC
		jQuery(document).ready(function() {
			jQuery('#dw__toc h3').click();
		});
	</script>
</html>

Hierfür muss allerdings HTML im Wiki-Markup erlaubt sein.

Getestet unter: DokuWiki 2012-10-13 „Adora Belle“ mit prsnl10 Template.

Leave a comment…



  __  __   __    ____   ____   __ __   __ __  _____
 / / / /  / /   / __/  / __/  / //_/  / // / / ___/
/ /_/ /  / /__ / _/   _\ \   / ,<    / _  / / (_ / 
\____/  /____//___/  /___/  /_/|_|  /_//_/  \___/
  • E-Mail address will not be published.
  • Formatting:
    //italic//  __underlined__
    **bold**  ''preformatted''
  • Links:
    [[http://example.com]]
    [[http://example.com|Link Text]]
  • Quotation:
    > This is a quote. Don't forget the space in front of the text: "> "
  • Code:
    <code>This is unspecific source code</code>
    <code [lang]>This is specifc [lang] code</code>
    <code php><?php echo 'example'; ?></code>
    Available: html, css, javascript, bash, cpp, …
  • Lists:
    Indent your text by two spaces and use a * for
    each unordered list item or a - for ordered ones.
Web 2.0



RSS   RSS abonieren

Github   Github
QR Code