We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 813 ☆ A M B ☆
    • 326 Posts
    Hi everyone,

    Let me start by saying that I’ve been an enormous MODx supporter and daily user for about two years, and one of the big reasons is that I recognize the power and flexibility of template variables. However, there’s one area where I think they’re quite limiting (or maybe I’m missing something obvious?). Let me see if I can explain.

    Let’s say I have a page where I want my backend user to be able to enter multiple blocks of similarly categorized and styled content. For example, maybe this is a catalog site where I want the user to be add several blocks of this code:

    <div class="catalogitem_block">
    <h2 class="catalogitem_title">Title</h2>
    <div class="catalogitem_content">
    Content
    </div>
    </div>
    


    To make this work, I could do one of three things:


    • The first is to create a template, create template variables for the h2 and content and tie them to this template, and then use Ditto to pull in the content on a sort of "parent" page.
    • The second is to just put in a WYSIWYG editor on the parent page and let them enter content free-form, without having to create the TVs and child pages.
    • The third is to create a TON of TVs, assuming I know how many h2s and content blocks there are going to be, and assign them all to the parent page, but this isn’t practical in most situations.

    Wouldn’t it be easier to just have a TV type that let my backend users click a button on the parent page that said "add block" or something similar, and doing so created a new, blank set of TVs? In the template, the TV call would then just output sequentially however many code blocks were entered?

    I know this may be a bit beyond the current intent of TVs and steps away from the "every block of content is its own page in the hierarchy" mantra that works pretty well in most cases, but I see this as being a much more commonsense and powerful way for adding repetitive content to a single page (table data in particular comes to mind), especially when you consider how heavily the AJAX nature of the MODx backend is touted. Or maybe there is already a way to do this that I haven’t considered?
      • 4172
      • 5,888 Posts
      have a look here, not for the backend, but for the frontend:
      http://modxcms.com/forums/index.php/topic,33985.msg206683.html
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 813 ☆ A M B ☆
        • 326 Posts
        Whoa -- that’s cool! Very nice work. Is it still in development?

        Unfortunately, I’m not sure it solves my issue. I’d prefer to have this capability happen in the manager with the TVs themselves. The site I would use this for is very large, and it would be difficult for me to explain to my backend users that on certain pages content is entered from the front end while logged in, but is entered from the manager on other pages (and I’m not about to build the whole thing into some sort of front end-manageable solution). Probably too confusing.
          • 4172
          • 5,888 Posts
          its still in development, yes. But I have it run on some pages. It can much more than you can see in the demo. So you can configure it, that you can do a lot at frontend, what editors do normally at backend.
          At the beginning of developement I had also some backend-stuff for that, but have decided to remove this functions, because I never used them.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 813 ☆ A M B ☆
            • 326 Posts
            I’m still not sure that would meet my needs (backend editing is still pretty much a necessity), but I’d be happy to give it a try. Any idea when a version will be available for download?
              • 4172
              • 5,888 Posts
              at the moment I have not the time to work on it. If you want to see it in action I can pm you a userpassword to play a little with it at frontend, if interested.
              The development-code is also on github. With some php/js/mysql/modx-skills I think one can make it run. But there is no internationalisation at this time and not much documentation (mostly in German).
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 813 ☆ A M B ☆
                • 326 Posts
                Sure, that would be great!
                  • 22897 ☆ A M B ☆
                  • 209 Posts
                  aladage, we’ve developed something like this in-house that can add repeating regions (or any kind of custom template variable) into the manager. We use external database tables for items like this (doing it with ’real’ template variables would be a pain!) and it works very nicely. One of our clients uses it for listing training course dates.

                  We expect to release the modifications to MODx back to the community at some point, but they need polish first and we haven’t yet found time.
                    MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
                    • 813 ☆ A M B ☆
                    • 326 Posts
                    Very interesting, Peter. Any idea when it will be publicly released? I’m not sure if this is possible in your situation, but would it be possible for you to PM me what you’ve done to date? I’m fine some rough edges if it means getting this to work. If not, I completely understand.

                    If this isn’t an option, I think I’ve come up with a solution that certainly isn’t ideal, but may work. I’m planning to create a ton of TVs (as stated in my third option), but then use ManagerManager to create a new tab and separate them from the rest of the page content. It’s FAR from ideal, but it at least gives a slight sense of organization to the backend.
                      • 22897 ☆ A M B ☆
                      • 209 Posts
                      Quote from: aladage at Jan 28, 2010, 08:46 AM

                      Very interesting, Peter. Any idea when it will be publicly released? I’m not sure if this is possible in your situation, but would it be possible for you to PM me what you’ve done to date? I’m fine some rough edges if it means getting this to work. If not, I completely understand.
                      It was supposed to be released over Christmas, but we lost Internet access so I couldn’t finish it in my free time. Unfortunately I can’t PM you the current work as it’s rather integrated with other client-only code.

                      Hopefully by mid-February I’ll get something out for early adopters!
                        MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!