We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 24520
      • 14 Posts
      Pretty close. This is somewhat close, but I don’t really get this "caching" thing. I thought that every page has it’s own set of TV’s instantiated on page creation and remembering any chances on PAGE scope, not global SCOPE.

      If I can get from Snippet a TV of template the Snippet resides in, then I will be able to develop some kind of functionality I want. Not that complex as I wanted previously. With some additional effort I could indeed (If my assumptions are correct) even develop something like paragraphsystem, but that would require substantial more TV’s for each template.
        • 24520
        • 14 Posts
        splittingred - YES, that looks like a simplified parapgraph system idea, thank you!. With some extensions for ordering, that would be what I was thinking of.
        Combining this with having Component (well, Snippet+Chunk) properties hardcoded into template in form of grouped TV’s that will make a complete solution for me. I would like some experienced developer to confirm if my way of thinking (of the solution) fits into MODx design.
          • 28215
          • 4,149 Posts
          Quote from: rattkin at Oct 18, 2007, 08:47 AM

          splittingred - YES, that looks like a simplified parapgraph system idea, thank you!. With some extensions for ordering, that would be what I was thinking of.
          Combining this with having Component (well, Snippet+Chunk) properties hardcoded into template in form of grouped TV’s that will make a complete solution for me. I would like some experienced developer to confirm if my way of thinking (of the solution) fits into MODx design.

          I think you could. The method in that wiki article I’ve employed to quite a few sites to get the ’Component’ idea you want - such as instantly including ’News’ sections, login boxes, etc into anywhere in the site that uses the template, all via toggleable checkboxes in the document’s edit screen.

          The method should allow you to define an infinite number of chunks to include into this method, since all you’re doing is grabbing all the chunks by category. Simply create parallel categories and TVs that reflect the section of the template you want the components to go into (i.e., how I did ’leftChunks’ and ’rightChunks’ in the wiki example.)

          Hope that helps.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 22548
            • 58 Posts
            I actually never understood that wiki-article and what was the benefit of your script compared to what Sottwell described here http://modxcms.com/forums/index.php/topic,901.0.html. Just blaming myself for that, however. embarrassed
            Quote from: rattkin at Oct 18, 2007, 08:41 AM

            Pretty close. This is somewhat close, but I don’t really get this "caching" thing. I thought that every page has it’s own set of TV’s instantiated on page creation and remembering any chances on PAGE scope, not global SCOPE.
            The caching part explained there is just a bonus smiley What I thought would help you was the TVs giving you different options part in the article. The way I understand it you could just place the options you want to give your authors - say article overviews with 3, 5, or 10 articles or any other number into a TV this way, so that your authors just select the checkbox they deem best for the site layout. But that is of course still way from a real GUI and I don’t know if it is really workable this way. So you better get that confirmation from others or just give it a try and see where it can take you. smiley
              • 24520
              • 14 Posts
              Well, pachinko, I understood it the same way, that article was helpful also. The idea is that if you cannot have properties in Components, lets put them as TV’s in template that steer those Components. This solution has some limitations, but will be sufficient in 70% of my cases.

              In the future, it would be cool to have properties assigned to Snippets, just the same way as they are bound to template now. I can see this as another secion in the page edit, which will basically iterate through every snippet, read their properties and allow to edit them. Just a thought.
                • 28215
                • 4,149 Posts
                Quote from: pachinko at Oct 18, 2007, 09:02 AM

                I actually never understood that wiki-article and what was the benefit of your script compared to what Sottwell described here http://modxcms.com/forums/index.php/topic,901.0.html. Just blaming myself for that, however. embarrassed

                The difference between the wiki article’s method and Sottwell’s is that Sottwell’s requires you to specify in the TV parameters each chunk you want to be toggleable or not. The TV-based chunks method in the wiki article allows you to do this simply by assigning a Chunk to a category - no editing of the TV necessary. You specify in the TV what Category you want to pull from, and all chunks henceforth after with that category are now available for toggling.

                  shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                  • 22548
                  • 58 Posts
                  Ooohkay. I guess I’ m half way there and my head’s not spinning around as fast as it was before. But I still have to try it out to fully grasp the concept. (And I guess that’s just what I was telling rattkin before rolleyes)
                  Thanks for clarifying this, Alex