We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5006
    • 14 Posts
    Hello,
    I am new with MODx and I try my best to understand this cool cms!

    Now want to generate (automaticly) a list of links in the sidebar of my testpage:

    content zone               | sidebar
    
    content goes here…         |  Link-01
    and more…                  |  Link-02
                               |
    <h3>Headline-01</h3>
    another content
    and more…
    and more…
    
    <h3>Headline-02</h3>
    another content
    and more…
    and more…
    
    


    These links point and let you go to an anchor inside the content.
    Example page, where you can go from top to a content anchor: http://wiki.modxcms.com/index.php/De:Tutorials_BlogAdvanced1

    Until now I think, that Ditto can do the job, but I cannot filter the content to <h3> and place all <h3> in a list.

    Do you have any suggestions? Perhaps I dont need Ditto and have to use advanced technics?
      • 4172
      • 5,888 Posts
      One Solution with Subdocuments for each block:
      http://www.modxcms.de/forum/post.php?CommentID=19080

      Or you need a plugin for onParseDocument which reads all <h3>.........</h3>, generates and inserts a link list and inserts anchors with str_replace.
      But I think its easier to go with subdocuments and Ditto.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 5006
        • 14 Posts
        Hey, thank you for quick replying - you are the same one who answerd me in the german forum?

        I think I have to check PHx or so, because I have many <h3> on my site. Perhaps I have to think about »CustomModifiers« whatever that could be? huh