We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40949
    • 20 Posts
    Is it possible to get 3 tabs with textareas where now only is the one textarea?
    I've read something about making a plugin and setting it to OnTempFormRender and then infusing some javascript. But I have no Idea on how to actually edit the existing content area into a modx-tabs type section.

    Any help is very much appreciated
      • 10208 ☆ A M B ☆
      • 1,780 Posts
      Can you explain why you want three content areas? The content area is just for the page content, and is called in your template with

      [[*content]]


      If you want places to put more stuff on a page, just create rich text TV's. Place them in separate categories, they'll each have their own tab. Change the setting for displaying TV's below content to "yes" and they'll sit right below the main content area on any resource that uses the template they're associated with.
        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 40949
        • 20 Posts
        That would be totally how I'd do it if I wanted to add more information to a document.

        However in the post above I'm talking about a Template page (create/update). I want HTML tabs because I want to be able to submit mobileContent and tabletContent as well as the standard Content. In essence 3 templates in one, mobile, tablet and desktop.
          • 10208 ☆ A M B ☆
          • 1,780 Posts
          Run some searches here for "template switch(ing)".

          Your content will be different for each template type? Just clarifying.

          The problem as I see it, and I may be wrong, but I'm fairly certain only one *content area is available, although template switching is talked of around here. It's basically a big rich text TV anyway, called "content". Not especially special... It doesn't even need to be used. The template itself could do all the work.

          Maybe GetResources will work for this?

          I haven't done anything quite that complicated, sorry. Responsive design satisfies the various screen sizes nicely IMO and the content for each is the same.
            Frogabog- MODX Websites in Portland Oregon
            "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
            Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • 40949
            • 20 Posts
            I want to be able to select a template based on what my Mobile Detection finds. And I want Resources to have 1 template linked to them. And thus that template should be split into 3 content areas. Which I can do by editing the core files. But I don't wanna do that.

            I want to get my 3 tabs where normally only 'HTML Content' would be, but then by means of a plugin which loads my own Extjs. Problem is not the plugin or the inserting of my own Extjs.

            Problem is I don't know how to setup my Extjs to expand this textarea into a modx-vtabs with 3 textarea.
              • 39932
              • 483 Posts
              Fuzzical Logic Reply #6, 14 years ago
              Why not have 3 Templates and do some real Switching...? generally less processing. I use this technique (and others) for my site. This is necessary for truly degradable AJAX anyway.

              Check out these two links: AJAX Login and Full page Login. This is one resource, no TVs and two Templates. It just so happens that I don't specify additional content, so its not a great example. Especially considering that I haven't stylized the full page version... The AJAX version is what you see to the left on the Full Page version (yes, it is loading the same resource twice on the Full Page version).

              The technique is highlighted on in my AJAX Framework tutorial, specifically in OnDegradeGracefully. (It handles cached pages too). The same could be done for mobile quite easily. (In fact, my technique can be applied to any page on my site) [ed. note: fuzzicallogic last edited this post 14 years ago.]
                Website: Extended Dialog Development Blog: on Extended Dialog
                Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
                • 40949
                • 20 Posts
                I chose this method mainly because I didn't want the client to have to do anything else than that he's doing now.

                And because otherwise I'll have 21 templates at the end of the day, instead just 7 with 3 types within. This way I can keep things tidy.

                I really like all of your ideas, and if it were up to me I would have looked into them, but this was a request from the client, and they've pointed out that it will be non-negotiable....

                So this still rests me with the question, how to 'extend' the template.panel.js with my own plugin and extjs.
                  • 39932
                  • 483 Posts
                  Fuzzical Logic Reply #8, 14 years ago
                  I'm just getting into extjs, so i couldn't advise you yet. Thanks for the compliments!
                    Website: Extended Dialog Development Blog: on Extended Dialog
                    Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                    Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                    Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".