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".
-
- 92 Posts
Any ideas how to make Date - Unixtime TV editable manually, just like "publish date" and "un-publish date"?
-
- 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.
-
- 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
-
- 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!