We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5913
    • 42 Posts
    So can I make a template that fits inside another template? Since the only part that changes on the site is the middle part of the body?
      • 25663 MODX Staff
      • 12,272 Posts
      Perhaps if you would show a sample of what your custom data columns would be and what you want the output to look like it’d be a bit more direct and productive. The answer to your question is yes. As with most things in MODx there’s several ways to achieve the same end result.

      Good starting points for learning about TVs (Template Variables) in general would be the wiki and the documentation ... and hundreds if not thousands of posts in this forum of course! smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 5913
        • 42 Posts
        Sounds Great! Thank you for all the advice and I am sure I am not done asking questions... Lol Learning curves are always so much fun hehe. I am enjoying not having to create 6 different things just to add something to the site lol (Yes that was a knock at Joomla) don’t get me wrong I loved working with Joomla but I was tired of having to hack the core every time I wanted to customize something (OK again not 100% true not all the time but a good amount). In regards to what the tv’s would be for example if you are listing cars you would have.

        • Make
        • Model
        • color
        • size
        • availability
        • etc...

        I think the hardest part is getting the grasp that every page on the site is based on documents.

        Again thankyou for all the info. One last thing can you make a tv into a select box? so say that your tv is color and then you would have a choice say red green blue ext...

        And thankyou again.

        P.S. The Wiki and I are becoming great friends I have like 8 FF tabs open at the moment looking up different things
          • 25663 MODX Staff
          • 12,272 Posts
          1) Create a template for your car listings: Car Listing Template

          2) Create a bunch of TVs (per above) and assign them to the Car Listing Template

          3) Create a container document to hold all your cars in the system and assign it the "Car Listing Template". That way all the other documents you create under it will automatically get the right template and you won’t have to manually switch it ... If you need a different template for the "real" parent container document, simply make a sub-document that’s not marked to show in menu.

          4) Create documents to your heart’s content inside the container in 3

          5) Use Ditto and a custom chunk-template to summarize/show all your individual items as you see fit.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 5913
            • 42 Posts
            Hello,

            Ok so I have been playing with it for abit on a test modx Site and I think I understand what needs to be done

            1. Create tv
            2. Create widget to have a custom widget that all the tvs printout to in the template http://wiki.modxcms.com/index.php/Adding_TV_Widgets_without_hacking_the_core
            3. have template call a chunk or snippet to decide on what is to be displayed based on the page info.

            I know I dont have to do the widget part cause I can do that right in the chunk but custom widget sounds like fun.

            Thoughts?

            Oh and for each document parent that needs a specific layout in the template could I not do a snippet that would check to see which document type it is and return the right part of the template instead of making multiple templates, Im still not sure on that part sound right which I guess by calling a snippet that calls a chunk is like making a template within a template.

            Also is there a better snippet then WebEditProfile for same? thoughts on it and Personalize. To do what I want I will either have to create a new one or tear apart the snippet I choose so that it can be ajax based.
              • 14431
              • 65 Posts
              Couldn’t help but wonder... have you taken a look at http://www.open-realty.org/? lots of folks have used it for applications other than real estate... like car sales.
              I’ve been toying with the idea of integrating OR as a component of a MODx site for some time now, but am waiting for MODx 0.97 or 1.0 before I do anything. Fortunately, my interest is just a hobby, so there’s no deadline wink.
              joe
                • 5913
                • 42 Posts
                Yep, I have seen that before thank you though.

                Can someone explain what Ditto is / does?
                  • 25663 MODX Staff
                  • 12,272 Posts
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 5913
                    • 42 Posts
                    Well it looks like Ditto is what I was looking for smiley Thankyou.

                    Can someone explain what &parents does? I tried doing &parents=`0` to no avail when my ditto was being called from the document it was only showing the children of that document (no biggie) but now I Dont get what the &parents does as I would have thought it would allow you to choose which document tree to parse?