We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32595
    • 7 Posts
    Quote from: sottwell at Jan 19, 2007, 05:44 AM

    Everywhere you put the TV tag, it willl be displayed, whether in a template or in document content or chunks. Wherever the MODx parser sees [*MyTVName*] it will replace the tags with the output of the TV.

    If you put a default value when you create the TV, every document will have that value unless you edit it for a given document. You can use "@INHERIT" as the default value. When you do that, edit the TV for a "folder/container" document, and all of its children will automatically inherit that value.

    Tested and works like a charm. Thank you very much. Just one more question please (im a newbie). How you create pages with modx? For instance, i have a index page and now i wish to have a another page call "news". Help will be much appreciated.

    You Rock!


    • Well, at the top of the Document Tree there is a little icon that looks like a folder with a paper and a green plus sign on it, and when you hover your mouse over it it says "New Document"; there is a menu item right there in the first "Site" tab, "New Document".
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 32595
        • 7 Posts
        Quote from: sottwell at Jan 19, 2007, 06:11 AM

        Well, at the top of the Document Tree there is a little icon that looks like a folder with a paper and a green plus sign on it, and when you hover your mouse over it it says "New Document"; there is a menu item right there in the first "Site" tab, "New Document".


        Ok thank you very much. Im getting there... grin
          • 6316
          • 92 Posts
          Any ideas how to make Date - Unixtime TV editable manually, just like "publish date" and "un-publish date"?
            • 32645
            • 377 Posts
            Can you clarify what you can do with Template variables?

            1. Am I right in thinking that you can use TV to store data into a page by adding fields to the end of the page editor. (ie: company address, etc)
            2. Where does this data go? How do you retrieve it?
            3. Am I right in thinking that you could use TV to store a lot of data (ie: company data, etc)?

            Thanks.
              • 6726
              • 7,075 Posts
              1. Yes you’re right

              2. The data goes into a bunch of tables

              modx_site_tmplvars : which holds the caracteristics of the TV
              modx_site_tmplvar_access : which holds who can access which TV
              modx_site_tmplvar_contentvalues : which holds the TVs content
              modx_site_tmplvar_templates : which maps TVs to templates

              Retrieving, displaying it is fairly simple using Ditto, GetField or a custom snippet (but Ditto should do the trick 95% of the times)

              3. Yes, you’re right. Now beware that depending of how many records we’re talking about, there is a limit of documents you can practically handle with MODx (current reasonnable limit is 5000). If you need to handle a very high document count, then you’ll have to create a custom DB and custom snippet to retrieve it...


                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l'outil id
                • 32645
                • 377 Posts
                Thanks for this! I intend to use Template Variables to store details relating to company information, such as address, telephone numbers (there aren’t many records) -- and it looks like TV is the answer I’m looking for!

                Many thanks!