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

    Is it possible to assign a set up a repeatable set of template variables on template in Revolution?

    Say i’d like to have an artist page that displays a bio and a few pieces of his or her art with a few fields of appropriate info (size, medium, price, sold/available). Opposed to having to create an individual document for each piece it would be awesome to just have one template and be able to simply have a region of repeatable Template Variables which the content editor would have the ability to duplicate and fill out.

    Basically something just like this: http://blog.pagelime.com/2009/12/01/repeating-regions-pagelime-feature/

    I guess one issue is that the TV tables are expecting specific value, but could not multiple values be logged to one TV value with a custom delimiter or something. Then we would just need a snippet to loop through these values and output them based on a given chunk with the appropriate placeholders ala DItto/getResources.

    This must already be possible somehow... anyone?

    bueller
      • 26016
      • 561 Posts
      That’s a very interesting idea. I’ve thought about such things where the user was entering a lot of "non-content" data, but the amount varying. Sometimes I just make lots of TV’s (SillyField1, SillyField2, etc.) and just styled the template so that empty ones look good. And I’ve also used Ditto/GetResources when real loops are more needed - each document using a special template becomes one loopable record in their Ditto-ized holder document, so to speak.

      I was thinking that someone could have a plain text field, somehow train the client to enter words with spaces in between (yeah, right!), and then grab and display all that with a snippet that would parse, template, and display the stuff, but you’ve got a bunch of fields, so that would be way too messy.

      I’m not sure, TV’s can certainly get way out of hand, let’s see what others say.
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 4172
        • 5,888 Posts
        you can try multiItemsGridTv. I think this can do what you want. (works on 2.0.8, not on 2.1, yet)
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 9550
          • 123 Posts

          Bruno: this looks great! totally what I was talking about. will test it out over the weekend.

          https://github.com/Bruno17/multiItemsGridTV
          http://modxcms.com/forums/index.php/topic,58511.100.html

          Thanks smiley
            • 16845
            • 26 Posts
            Matrix by Pixel & Tonic for ExpressionEngine.
            This is how it’s done properly. It’s slick, it’s easy and it’s solid.
            In some ways MODx is a dream. In others, it’s so far behind.

            http://pixelandtonic.com/matrix

              • 9550
              • 123 Posts
              lechatlisse: wow, that looks damn sexy.... how is EE btw? I’ve always been impressed with how commercially stable it seems against like a zillion open source options. And extensions like these look amazing: http://pixelandtonic.com/fieldframe
                • 26016
                • 561 Posts
                I must say, in recent times, Bruno has become one of the most valuable players around here. Whenever I hear a pretty tough question, it seems like he magically shows up with an answer. Maybe MODx can give out awards for people like him!

                As regards Expression Engine, its fans are legion, and its devotees love it. Although I’m very much an free open-source person, I do see how there can be advantages to having a paid system, and I occasionally point people to those systems. I’ve always thought that the biggest complainers should choose a paid system, because then their whining may be treated with more urgency, and you’re not left relying on the kindness of forum strangers. But then I remember... the biggest whiners are usually also the cheapest people, so that’s out. smiley
                  MODx and Wordpress development
                  Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4