We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    Simple fact, MODx is designed for web developers first at the moment. Now that I have the Ditto code working just about flawlessly (got one more code release), having a nice purty AJAX GUI is next.
      • 18397
      • 3,250 Posts
      Bottom line: make it work first, make it purty second.
        • 9050
        • 13 Posts
        Quote from: Mark at Jun 08, 2006, 10:05 PM

        Bottom line: make it work first, make it purty second.

        Yes, you`re right.
        I now got a working Version:
        The customer can change the shown Article by changing the "hidemenu" - Status, this is filtered by the snippet.
        The User gets a visual feedback of what Article is active.
        So I got step one.

        But: the has to care about that only one Article is visible - thats ok, but not very handy.
        So step two is:
        Changing an custom item, passing through a variable that has been set in the backend would be a nice feature that I maybe can use in some other cases.



        many greetings
        Eckhard
          • 9050
          • 13 Posts
          Quote from: erotte at Jun 10, 2006, 10:44 AM


          Yes, you`re right.
          I now got a working Version:
          So I got step one.

          ...and I’m furthermore interested in step two...

          Does anybody have an idea for doing this job:

          - Filling a selectbox tv with [pagetitle|document.id] from a folder
          - passing the selected document.id to the ditto snippet

          ?

          Please add a note if you have a hint or a solution.

          many thanks,
          Eckhard
            • 18397
            • 3,250 Posts
            Passing the value is simple. Just call ditto like so
            [!ditto?startID=`[*yourtv*]`!]
              • 9050
              • 13 Posts
              Quote from: Mark at Jun 18, 2006, 12:02 AM

              Passing the value is simple. Just call ditto like so
              [!ditto?startID=`[*yourtv*]`!]

              OK, thats really simple, many thanks.

              Do you also know how to get a list of tv_pagetitle/document.id from a directory into a selectbox?

              I think I have to use @EVAL or @SELECT bindings. The documentation is not very informative here., maybe you can give me a hint?
                • 9050
                • 13 Posts
                hi there,

                finally I got this solution:



                • create a tv with input type "Drop Down Menu"
                • add a Binding like this
                  ( 2 is the id of the parent folder)
                 " @SELECT pagetitle,id FROM site_content WHERE parent= 2 " 


                • call the tv with ditto like this (previous post)
                 [[ditto? &startID=`2` &filter=`id,[*dropdowntv*],1` &tpl=`news_home`  &total=`1`   ]]
                




                many thanks,
                E.