We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Need some assistance in coming up with a smart way to accomplish the following:

    Assume you’ve got 10 product categories, and 3 types of purchasers (distributor, wholesale and retail). Further assume that Distributors only can purchase 2 product categories, wholesale can purchase 6 categories, and retail can purchase all 10 categories.

    I’d like to set these up as 10 folders inside a products folder in the site tree and be able to dynamically reuse them in other areas of the site. A key factor is that I also want to be able to maintain a breadcrumb trail to how visitors got to their current location. I also would like to be able to build dynamic menus, that update as categories and products are created.

    This would mean the Distributor menu only shows 2 categories under products, the Wholesale menu shows 6, and the Retail menu shows all 10 product categories... all built again from the same folders. When selecting the categories in Distributor, the Page Trail/Breadcrumb would show Distributor > Products > Category 1, and so on for the other customer types. When drilling down to individual products, the page trail would display Distributor > Products > Category > Product Page.

    Any thoughts on the best way to pull this off?
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 18397
      • 3,250 Posts
      • That gets closer Mark, but I would need to pull all the content + TVs from entire pages in, not just simple chunks. I thought there was a snippet floating around these forums that pulled the entire page from another doc, but I can’t seem to find it...
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 18397
          • 3,250 Posts
          Quote from: rthrash at Sep 12, 2005, 02:27 AM

          I thought there was a snippet floating around these forums that pulled the entire page from another doc, but I can’t seem to find it...

          I think I know of the snippet you are referring to....
          I believe it was by Ralph but I am not sure.

          Just in case you can’t find that one, GrabPage (via Etomite forums) will work but it is a little more than you need.
            • 34162
            • 1 Posts
            Just to document this in case I forget it later, but this is in the core of TP4:

            [:pageid:] or [:aliasname:] will automatically pull the content area of another page into the current one, including all embedded snippets.

            It, however, doesn’t include the CFs because I couldn’t figure out how to handle collisions. Any documents that the included document includes will likewise be parsed, etc., although there is protection against recursion-- any requests to include a document that was previously included is just silently ignored.

              • 18397
              • 3,250 Posts
              Quote from: infoclipper at Sep 12, 2005, 06:28 AM

              It, however, doesn’t include the CFs because I couldn’t figure out how to handle collisions. A


              CFs huh
              • Mark... part of the to-be-announced and still to-be-finalized lingo simplification. Ignore it for now. wink
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • Travis, that still wouldn’t accomodate the needs in this situation unless I’m reading it wrong... I need to basically replicate a page in multiple locations or have documents be able to have multiple parents.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 34162
                    • 1 Posts
                    Ryan, you know that request amuses me, given our dialogue over the past month. ;-)

                    BTW, I keep getting an error when trying to post:
                    "Your session timed out while posting. Please try to re-submit your message."

                    Any idea what is causing that?

                    I have to hit submit about 5 or 6 times before the message finally goes up...
                      • 1764
                      • 680 Posts
                      Quote from: infoclipper at Sep 12, 2005, 06:28 AM

                      [:pageid:] or [:aliasname:] will automatically pull the content area of another page into the current one, including all embedded snippets.

                      I’ve thought about this before and I think it’sa great idea but I was thinking more along the lines of something like

                      [*content:pageid*]
                      [*tv_name:pageid*]


                      So that a normal [*content*] will assume you’re looking for the current page but you can easily specify a page by id to pull any TV/CV in. I don’t think it would be a good idea to use alias names because you can have duplicate alias names.

                      P.S. I’m not sold on the syntax, just an example.