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

    I have website which uses duplicate documents in different categories.

    Theme decors > Halloween
    Shopping centres > Halloween

    Is it possible to just make a link in the other category, so the user only has to adjust one page?

    Just a link to the other category is not good enough, the page has to load under both categories in the url and navigation on the website.

    thanks!
      Don't believe anything you read on the net. Except this.
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: Hori76 at Feb 16, 2010, 04:02 PM

      Hi,

      I have website which uses duplicate documents in different categories.

      Theme decors > Halloween
      Shopping centres > Halloween

      Is it possible to just make a link in the other category, so the user only has to adjust one page?

      Just a link to the other category is not good enough, the page has to load under both categories in the url and navigation on the website.

      thanks!
      You could use a snippet on the duplicated Resources to $modx->sendForward() to the "master" Resource, though you’ll need to build your menus based on the actual REQUEST_URI or some other information rather than the "master" Resource’s location in the tree.
        • 12352
        • 101 Posts
        Thanks for looking at it, but I think I found an easier way for me

        Installed the snippet GetField
        Made a TV [*document-id*] for the duplicated document, which stores the number of the original document

        In the duplicated document I fill in the textfields with following calls:

        [[GetField? &docid=`[*document-id*]` &field=`pagetitle`]]
        [[GetField? &docid=`[*document-id*]` &field=`longtitle`]]
        [[GetField? &docid=`[*document-id*]` &field=`description`]]
        [[GetField? &docid=`[*document-id*]` &field=`content`]]
        ...

        This document can be duplicated in another category and call the text of the original document, just by adjusting the TV [*document-id*]

          Don't believe anything you read on the net. Except this.
          • 12352
          • 101 Posts
          You could use a snippet on the duplicated Resources to $modx->sendForward() to the "master" Resource, though you’ll need to build your menus based on the actual REQUEST_URI or some other information rather than the "master" Resource’s location in the tree.

          Hi, I’m trying to use sendForward, but if I can understand it, it should not change the URL. If I use the snippet on the duplicated document it just forwards to the original document and the url changes. Or am I missing something?
            Don't believe anything you read on the net. Except this.
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: Hori76 at Feb 25, 2010, 04:28 AM

            You could use a snippet on the duplicated Resources to $modx->sendForward() to the "master" Resource, though you’ll need to build your menus based on the actual REQUEST_URI or some other information rather than the "master" Resource’s location in the tree.

            Hi, I’m trying to use sendForward, but if I can understand it, it should not change the URL. If I use the snippet on the duplicated document it just forwards to the original document and the url changes. Or am I missing something?
            URLs aren’t changing when I do this. You’ll have to provide more information.
              • 12352
              • 101 Posts
              Strange, tried it several times this afternoon, filled in the snippet now and it works! embarrassed

              Like you said, my wayfinder menu still changes to the original document. I’m using friendly urls, how do I use these parameters in the wayfinder call?

              thanks!
                Don't believe anything you read on the net. Except this.
                • 12352
                • 101 Posts
                Can somebody tell me how to build the menu based on the REQUEST_URI?
                  Don't believe anything you read on the net. Except this.