We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32963
    • 1,732 Posts
    Hi,

    Sometime ago the it was mentioned that we should merge chunks and templates. At the time there was no way to include a template and Travis had already started to merge chunks with Snippets by calling them "HTML Snippets". Today we now can insert a template inside a document using the format [[$TemplateName]]

    In addition we can also process a template by passing parameters to it:

    [[$MySideBar? &color=`#ffcc00` &font=`verdana,arial`]]

    This functionality would make HTML Widgets redundant.

    What do you think?

      xWisdom
      www.xwisdomhtml.com
      The fear of the Lord is the beginning of wisdom:
      MODx Co-Founder - Create and do more with less.
      • 22303 MODX Staff
      • 10,725 Posts
      Yeah, I thought the plan was to merge all of these into one tag format and call them all templates, but that processing on the back end would be determined by what type of ’template’ it was, be it snippet, chunk, or template. Then someone decided to call them all widgets and now I’m confused again. rolleyes
        • 25663 MODX Staff
        • 12,272 Posts
        Static WIdget (chunk)
        Dynamic Widget (snippet + plugin)

        Formatting Widget (display controls->widget)
        Input Widget (input controls->widget)

        But they’re all just "variations of a widget" to the newbies. Helpful?
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 32963
          • 1,732 Posts

          I thinking that since we will be allowing users to pass parameters into a template (example [[$MyTemplate? &color=`#ffcc00`]]) then we don’t need Static Widgets. In other words Chunks (aka Static Widgets) will just be seen as a template (or sub-template).

          This means that users will use a template to store their html codes the same way they are using chunks now.

          This means that there’s no longer a need for Static Widgets.

          Wigets - a combination of snippets/plugins (PHP)

          Templates - a combination of existing "Templates" and chunk (HTML).

          In the case of Templates we don’t need to create any new table as the templates table already exist and will not conflict with the new system.

            xWisdom
            www.xwisdomhtml.com
            The fear of the Lord is the beginning of wisdom:
            MODx Co-Founder - Create and do more with less.
            • 25663 MODX Staff
            • 12,272 Posts
            Perfectamundo and even more simple! laugh
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 32963
              • 1,732 Posts
              Hi Adam,

              Well it seems you only need to merge snippets and plugins (kinda wish I never separated them in the first)


                xWisdom
                www.xwisdomhtml.com
                The fear of the Lord is the beginning of wisdom:
                MODx Co-Founder - Create and do more with less.
                • 1764
                • 680 Posts
                Okay, but the way I’m doing widgets it’ll actually be very simple to add any sort of Code into them including HTML. We could actually make everything a widget bedind the scenes and separate them out in the frontend.

                I also think we need to keep a frontend separation of templates from chunks. Because some chunks really can’t be used as templates and they shouldn’t be clogging up the lists in the document and TV editors.
                  • 32963
                  • 1,732 Posts
                  Quote from: aNoble at Dec 02, 2005, 10:46 AM

                  I also think we need to keep a frontend separation of templates from chunks. Because some chunks really can’t be used as templates and they shouldn’t be clogging up the lists in the document and TV editors.

                  Yes there will be a distinction bewteen Page Templates and Content Templates
                    xWisdom
                    www.xwisdomhtml.com
                    The fear of the Lord is the beginning of wisdom:
                    MODx Co-Founder - Create and do more with less.
                    • 25663 MODX Staff
                    • 12,272 Posts
                    This is really great stuff. Whether it’s all one thing on the back end and many descriptions, or one description/term and many on the back end doesn’t matter as long as it’s logical and easy to understand by the users. smiley

                    This is going to be killer stuff!


                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 32963
                      • 1,732 Posts

                      The thing to note is that Content Templates should not contain <html> tag only codes between <body> tags

                      Page tags are for full page templates
                        xWisdom
                        www.xwisdomhtml.com
                        The fear of the Lord is the beginning of wisdom:
                        MODx Co-Founder - Create and do more with less.