We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9050
    • 13 Posts
    Hi there,

    is there a way to assign the Page (id) to be shown to the Newslisting Snippet, maybe with an Selectbox?

    Only one entry (of lots) should be displayed on the Homepage.

    The CMS-Editor should be able to select from Pages stored in a (modx-)Folder.

    Do you have an Iidea? Maybe with filters or sorting the newslisting output?
    Or with another Snippet?


    greets + thanks,
    Eckhard Rotte


      • 18397
      • 3,250 Posts
      Are you referring to the backend or frontend? If the backend, are you talking about a utility to generate Ditto calls? If so, that is coming up next.
        • 9050
        • 13 Posts
        Quote from: Mark at Jun 07, 2006, 12:47 PM

        Are you referring to the backend or frontend?

        Backend.


          • 9050
          • 13 Posts
          Hi there.

          I had a look at Ditto, another nice and Powerful Extension for modx.

          But - isn’t ther a more simple way to do this?
          Maybe by an tv with an @BINDING?



            • 18397
            • 3,250 Posts
            Let me clarify, if all you wish to do is have a dropdown box with all of the documents available on each backend page so you can change the Ditto start folder then yes.

            But if you are going to go to all that trouble why not just change the &startID when calling the snippet?
              • 9050
              • 13 Posts
              Quote from: Mark at Jun 07, 2006, 02:15 PM

              Let me clarify, if all you wish to do is have a dropdown box with all of the documents available on each backend page so you can change the Ditto start folder then yes.

              Ok, I´m new on modx and not good on scripting PHP. So I`ll accept your advice and try it again with Ditto.

              Quote from: Mark at Jun 07, 2006, 02:15 PM

              But if you are going to go to all that trouble why not just change the &startID when calling the snippet?

              Thats why I use an CMS. ;-)
              Just changing an ID I also could do in an SQL Statement...
              And: Its not me that has to change this entry.
                • 18397
                • 3,250 Posts
                Ok, you lost me there. MODx is designed so wherever you want to see something dynamic you run a snippet. So say you wanted some news on your homepage from elsewhere on your site. You would just put [[ditto? &startID=`#`]] in the content of that document and volia--- it works. The designer just puts snippets or chunks (which can include snippet calls) wherever he or she wants them and all is well.

                If you are describing an elengant, insert Ditto here with xyz settings style wizard, that is next in the pipeline.
                  • 9050
                  • 13 Posts
                  Quote from: Mark at Jun 07, 2006, 08:57 PM

                  Ok, you lost me there.
                  Maybe my English is too bad, and not accurate, sorry..

                  Quote from: Mark at Jun 07, 2006, 08:57 PM

                  MODx is designed so wherever you want to see something dynamic you run a snippet. So say you wanted some news on your homepage from elsewhere on your site. You would just put [[ditto? &startID=`#`]] in the content of that document and volia--- it works. The designer just puts snippets or chunks (which can include snippet calls) wherever he or she wants them and all is well.

                  If you are describing an elengant, insert Ditto here with xyz settings style wizard, that is next in the pipeline.

                  I thought on a procedure like this:

                  While editing the Homepage, I get a list box filled with the documents stored in a folder, maybe "Articles".
                  Selecting one of these entries passes the ID of the document to the ditto snippet.

                  So what I need is:

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

                  Is this possible? Is there something like a "best practice" for tasks like this?


                  Many thanks again for your time and your work,

                  Eckhard
                    • 18397
                    • 3,250 Posts
                    That is possible.... not sure why looking over to the left and typing in the ID is much harder. Either way, I’ll see if I can come up with something for you.
                      • 9050
                      • 13 Posts
                      Quote from: Mark at Jun 08, 2006, 09:11 AM

                      ... not sure why looking over to the left and typing in the ID is much harder.

                      Not for me. But the Customer doesnt want to type IDs.

                      And: why do we have all these stuff with AJAX and Effects?
                      Thats why I use a CMS. To create a GUI for processes like selecting an ID of an Element...