We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20867
    • 13 Posts
    hi
    i have in MODX a tree containing a document "ABOUT US" and its sub document "PERSON 1" "PERSON 2"...
    each sub document will contain a name(long title) and a content (image and text)
    iv used 2 dittos with a different template to divide the name of the sub document from its content
    and i want that each time i click on a name..its content will show up in the middle of my page

    visual exp

    my main menu is on the left and once i click on ABOUT US ill have the following page in my RIGHT COL

    UPPER BOX

    PERSON 1
    PERSON 2
    PERSON 3 ------generated by Ditto containing a template displaying the "long title" as the button name (person 1 or 2..)
    PERSON 4 <div id="person_name"> <a href="[+id+]">[+longtitle+]</a> </div>
    PERSON 5


    LOWER BOX

    ----------------

    IMAGE OF PERSON -----------generated by the same ditto as above but only containing the content of the document.
    <div id=’person_image’>[+content+]</div>
    ----------------

    _
    Both dittos have the same id "person_list"
    and the result will be

    UPPER BOX

    <div id="person_list">
    <div id="person 1">
    <a href="#">PERSON 1</a>


    LOWER BOX

    <div id="personlist">
    <div id="person 1">
    <img src=...../>

    i did hide the content with a display:none
    now what’s the code that can associate each name to its content so when i click on Person 1 ill have the content of Only person 1
    i have read jquery and moo-tools docs but none of them is compatible with what i want.
    i dont know if my approach is good

    any other way to do it?

    thanks for any help.
      • 25663 MODX Staff
      • 12,272 Posts
      Please don’t double post
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me

      This discussion is closed to further replies. Keep calm and carry on.