We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36747
    • 138 Posts
    i think that having multiple parents id would improve modx smiley

    nothing more to say...
      patagonia, argentina
      • 25663 MODX Staff
      • 12,272 Posts
      Or how about document aliases. Same thing, different way to say it. wink
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 36747
        • 138 Posts
        as you wish if the result is the same for the visitor smiley
          patagonia, argentina
          • 7455
          • 2,204 Posts
          In what setting / way would you wanne use somthing like that?
            follow me on twitter: @dimmy01
            • 36747
            • 138 Posts
            I need it in my current project. http://sabf.itba.edu.ar/cms
              patagonia, argentina
              • 7455
              • 2,204 Posts
              I do not realy understand

              is it like giving multiple parents the same id? or give having more id's for one parent?

              I am confused :shock:

              what cool things could you do with an fuction like that?

              /me is looking realy stupid asking this question

              :idea: ok I think I start to understand that when you have somthing like a contact page listed under parent1 that you could also let the same page unther a nother parent: parent2?



              if that is the case I would realy like that now i use a link to do that hehe
              I have 2 places wher a contact page is neded in one site same doc 2 sub menu's

              ok I hope that that is the case that would be very helpfull


              man my english SUCKS hehesorry :roll:
                follow me on twitter: @dimmy01
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                That could be done. It would require taking the "parent" field out of the content table, and creating a new table "content_parent" with two fields, doc_id and parent_id. That way document x could have as many entries in the content_parent table as you want it to have parents. Of course that would complicate any menu generating snippets somewhat.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Actually, there's a way to do this now of sorts with a little bit of work. Totally untested, but..

                  1) Create a templte called "alias".
                  2) Create a TV called "alias" allowable only on the alias template. In the default value but an @binding of @DOCUMENT with the appropriate ID
                  3) Create the age with the template and if you need to change the alias ID you're done!

                  Raymond, this will work, right?
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 32963
                    • 1,732 Posts
                    Actually, there's a way to do this now of sorts with a little bit of work. Totally untested, but..

                    1) Create a templte called "alias".
                    2) Create a TV called "alias" allowable only on the alias template. In the default value but an @binding of @DOCUMENT with the appropriate ID
                    3) Create the age with the template and if you need to change the alias ID you're done!

                    Raymond, this will work, right?

                    Yeah, from looking at this I think it should work. This is also useful if you want to share/use the content of a document inside other documents. Please see the turtial on "Binding Template Variables to a Data Source"
                      xWisdom
                      www.xwisdomhtml.com
                      The fear of the Lord is the beginning of wisdom:
                      MODx Co-Founder - Create and do more with less.
                      • 27
                      • 117 Posts
                      @Susan

                      I was reading this thread and thought i’d ask if you could expand on what you said a little, i have a situation where its likely lots of documents will need many parents each - do you mean replace the ’parent’ field in the database?

                      cheers

                      0