We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32038
    • 26 Posts
    I have the following scenario that I am looking for a good approach.

    I have a Solutions Area, divided out into 3 "Brands". Within these brands are the different solutions pages. There is a case where where a particular solution is to be available on two or even all three brands.

    For a visual of the this take the following layout:

    Solutions - Off the Main navigation
    Brand X
    Solution 1
    Page a
    Page b
    Page c
    Solution 2
    Page d
    Page e
    Page f
    Solution 3
    Page g
    Page h
    Page i
    Solution 4
    Page j
    Page k
    Page l
    Solution 5
    Brand Y
    Solution 2 (dup)
    Page d
    Page e
    Page f
    Solution 3 (dup)
    Page g
    Page h
    Page i
    Brand Z
    Solution 6
    Page j
    Page k
    Solution 3 (dup)
    Page g
    Page h
    Page i


    I prefer to design this so the information for the solutions are maintained only in one place.

    First attempt was to make the duplicate solution it’s own structure outside of the main tree, marking it as don’t show in menu and then use a web link back. That works except for the fact I would expect the pages under solution to be part of the main tree.

    I think I could probably create my menu by looking at what page I am linking to and then use wayfinder to create the menu as I would expect. I have not tried that nor am I sure it would work. Or if there is even a better, possibly simpler solution.

    Any thougths on best approach or if this has been covered in a previous post just point me the way.

    Kind Regards,

    Craig



      • 5340
      • 1,624 Posts
      This is a possible solution. You would have to duplicate the structure but not the content

      1. Add a new TV to your template: Call it "Inherits". This TV should contain the ID of the document it inherits

      2. When adding a duplicate instead of entering the content enter the ID of the document it inherits content form

      3. Use phx in your template to detect if "Inherits" TV has something in it. Example here

      4. Use GetField snippet to get the content

      5. [optional] Make it nice by installing http://modxcms.com/extras/package/608.

      Let me know how it goes
        • 32038
        • 26 Posts
        Cipa,

        Thanks for the quick reply. I like your approach and will give it a go. I don’t think I mind the structure is duplicated as it gives a bit of flexibility of the structure if that is desired by the content people.

        I’ll let you know it goes. Going to give it try here shortly.

        Kind Regards,

        Craig
          • 7231
          • 4,205 Posts
          I have done this by using a tag to define the relationship and build the menus using the tag rather than the physical parent. In my project I used the parent options as the options for the tags. So, using your example, the tags options would be Brand X, Brand Y, Brand Z. I used a multiple choice pull down menu TV as the method for selecting the Tags.
            [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]
            • 32038
            • 26 Posts
            Shane,

            Can you expand on this a little bit? I’m not sure if I follow your suggestion here...


            Quote from: dev_cw at Dec 23, 2009, 03:51 PM

            I have done this by using a tag to define the relationship and build the menus using the tag rather than the physical parent. In my project I used the parent options as the options for the tags. So, using your example, the tags options would be Brand X, Brand Y, Brand Z. I used a multiple choice pull down menu TV as the method for selecting the Tags.

            Regards,

            Craig