+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Displaying links to subpages on home page ?

  1. #1
    Join Date
    Jul 2007
    Posts
    87

    Default Displaying links to subpages on home page ?

    Hi,

    I want to have a page on my wiki for each client with their details on it. Under each client page I want a page for each of the clients projects to date etc.

    On their top page I would like links to all the pages underneath, ideally updated automatically.

    Is there a dekiwiki specific widget or tag i can insert in the template of my client contact pages that will show links to all the sub pages, without me having to create each entry then create a link to that page on the top page ?

    Olly

  2. #2
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    290

    Default

    Yes. http://wiki.opengarden.org/Deki_Wiki/DekiScript explains this. Specifically, http://wiki.opengarden.org/Deki_Wiki...Wiki_Functions . There are several options for this. I think you want "{{wiki.tree(page.name)}}"
    /Aaron Fulkerson

    Follow me on Twitter: @Roebot
    skype: aaron.fulkerson

    Sharing is good.

  3. #3
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    {{ wiki.tree(page.path) }} will show all pages below the current page.

    {{ wiki.tree("User:Bob") }} will show all the pages below Bob's user page

    {{ wiki.tree("Customers/Big_Corp/Projects") }} will show all pages under the http://mywiki/Customers/Big_Corp/Projects page.

    Hope that helped!
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  4. #4
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    290

    Default

    I just doc-ed this some more by providing some examples here: http://wiki.opengarden.org/Deki_Wiki...ction_Examples , enjoy!
    /Aaron Fulkerson

    Follow me on Twitter: @Roebot
    skype: aaron.fulkerson

    Sharing is good.

  5. #5
    Join Date
    Jul 2007
    Posts
    87

    Default

    Thanks chaps,


    I tried inserting the string

    {{wiki.toc(page.path)}}

    in to my template for the contacts page, but it just shows that string and doesnt display the toc. Same goes for the treeview.

    Should I be doing something to the string to have dekiwiki pick it up ?

    Olly

  6. #6
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    In a template page, the DekiScript statemetns (i.e. {{ }}) are not executed, but only displayed. In general, they have no real value inside templates, so it's nicer to see what dekiscript is present than the actual outcome.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  7. #7
    Join Date
    Jul 2007
    Posts
    87

    Default

    They arent working if i put them in a normal (non-template) page either, it just shows the {{ }} bit rather than its calculated results.

    Olly

  8. #8
    Join Date
    Feb 2007
    Location
    San Diego, CA
    Posts
    733

    Default

    Do you see the {{ }} in edit mode and after pressing save? Edit mode will always show the {{ }}, but view mode should display the calculated result.

    I setup a test page at http://wiki.opengarden.org/User:Brigettek and {{wiki.toc(page.path)}} appears to calculate properly.

  9. #9
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    Also note that {{ }} evaluation will not occur inside 'Formatted' text (<pre> elements).
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  10. #10
    Join Date
    Jul 2007
    Posts
    87

    Default

    Grrr, i just want it to show after i type it. Wherever I type it, on any page, regardless of style (or not), nowt happens

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts