Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author dmccan

    (@dmccan)

    Hi Jim,

    If you are using the TOC shortcode then you can edit the TOC content in the TOC article in the post editor the way you want and it should show up there as desired. For example, on this page the part with the grey background is the TOC:

    https://www.davidmccan.com/wiki/chess-combinations/

    What this means, is that you might have to use some HTML and CSS in the TOC. Here is an example of what I mean:

    <div style="background-color: #e0e0e0; float: left; padding: 10px;">
    Table of Contents
    <ul>
    	<li>[yadawiki link="First Article" show="First Article"]</li>
    	<li>[yadawiki link="Second Article" show="Second Article"]
    <ul>
    	<li>[yadawiki link="Subsection One" show="Subsection One"]</li>
    	<li>[yadawiki link="Subsection Two" show="Subsection Two"]</li>
    </ul>
    </li>
    	<li>[yadawiki link="Third Article" show="Third Article"]</li>
    </ul>
    </div>
    Thread Starter jcanup42

    (@jcanup42)

    Thanks dmccan – That worked. Is there a easy way to make the hand made TOC some code that can be included at the top of each page?

    I doubt it, but I thought I would ask anyway.

    JIm

    Plugin Author dmccan

    (@dmccan)

    Hi Jim,

    If I understand correctly, then yes, it is possible. What you do is create a wiki article with a title of TOC. Put your hand made TOC in that wiki TOC article. Then use the TOC shortcode, which is a button in the editor window, when creating a new wiki article. That inserts the TOC where the shortcode is. Leave the category and sort by options blank.

    It might take a little trial and error, but I think that should work for you. Here is a bit about it from the description:

    TOC Shortcode: With Yada Wiki, you can create a special wiki post with the title of “TOC”, for table of contents, and create a wiki post that will serve as the table of contents for your wiki. You can use wiki links and style the table of contents as you like in the post editor. The second button opens a pop-up for the TOC shortcode.

    The TOC shorcode takes two optional parameters: “Category” and “Order”. If no optional parameter is chosen then the content of the TOC wiki article will show in the shortcode location when the page is viewed. Note that the TOC only shows if it has been published. If a “Category” is chosen then that will override the insertion of the TOC content and will instead insert a list of the wiki articles assigned to that category. The category list can be ordered by article title or by article creation date. Title is the default. If no category is chosen the “Order” parameter is ignored.

    Thread Starter jcanup42

    (@jcanup42)

    Now for my next challenge…
    Can I have multiple TOCs and do it this way? For Example: TOC_Project_1 and TOC_Project_2.

    Jim

    Plugin Author dmccan

    (@dmccan)

    Hi Jim,

    Unfortunately, the plugin one supports one TOC. There may be a way to do it with some other plugin, but I don’t know how you would go about it.

    By the way, were you able to get the TOC working (regular or “first” one)?

    Regards,

    David

    Thread Starter jcanup42

    (@jcanup42)

    Thanks David for all your help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ordering Wiki Pages in TOC’ is closed to new replies.