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

    I am trying to duplicate content in a number of pages. The client wants the same content to appear under different areas in the navigation with unique urls. (It is a legacy site being converted to MODx, so keeping the structure is important to them.)

    Here are three possible solutions that I have come up with.

    Using PHx:
    content: [+phx:input=`28`:docfield=`content`+]

    Using Ditto:
    content: [[Ditto? &documents=`28` &tpl=`duplicateContent`]]

    Using Template Variable (dupContent) and a extra template:
    dupContent: @Document 28

    They seem to have the same results, however I believe the ditto version will cache better. Is there a better way? On issue is editing the content. It will be confusing for the client to find the correct document to edit.


      DropboxUploader -- Upload files to a Dropbox account.
      DIG -- Dynamic Image Generator
      gus -- Google URL Shortener
      makeQR -- Uses google chart api to make QR codes.
      MODxTweeter -- Update your twitter status on publish.
      • 7231
      • 4,205 Posts
      On issue is editing the content. It will be confusing for the client to find the correct document to edit.
      With Ditto you can include the quickedit tags and have edit butons for the ditto content.

      As for which method is best..I don’t know?
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 27749
        • 53 Posts
        Thanks a lot bwente!
        I have spent about an hour to figure out how to use the docfield custom modifier. Obviously - this combination I din’t try ;-)
        Saved my evening (and messing with ditto templates etc.)
        Cheers!
          • 4385
          • 372 Posts
          I am glad it helped. I do like PHx, it really helps in a pinch.

          I did however finally go with Ditto, it was helpful for the client using Quickedit. The ditto template/chunk was very simple it only had one line "[+#content+]".
            DropboxUploader -- Upload files to a Dropbox account.
            DIG -- Dynamic Image Generator
            gus -- Google URL Shortener
            makeQR -- Uses google chart api to make QR codes.
            MODxTweeter -- Update your twitter status on publish.