After having mastered (at least partly) the snippet/DropMenu stuff I tried to play around with the TV materials.
In the first place the result of placing [*tvname*] with some more or less random settings resulted in strange editors being displayed directly on the page.
I read the documentation carefully, but the difference between editing- and displaying-features of TVs didn’t get clear to me. Is a TV intended to edit or to display? And if both, how do they play together? And why are editing-features rendered on the page instead of being accessible only via the edit-menu?
Eventually I regarded the @CHUNK binding for the most simple stuff. So I defined a chunk named "test", put some <h3> code in it, and a TV named "tvtest" with "@CHUNK test" (without quotes) as the Input Option Value and gave all existing templates access to it.
Then I placed [*tvtest*] in my template’s code.
Result: The JS-Quickeditor-menu offered me to edit the TV in a new entry of the dropdown-list (the editor-field in the popup-window was empty, however), but in the source code nothing showed up.
What’s wrong here? And how do I use TVs in my template without invoking an editor but display content? Do I have to logout as an admin? Will the editor appearing IN the page (not in an editor popup-window) disappear when content is fed in?
After fiddling around for days I have to say that the MODx way is quite hard to follow. Strange concepts and behaviours and the documentation is focused on features, not on results...
Isn’t there somebody willing to show how to build one of these classical 3column-sites with MODx?
Or simply has done it already and is willing to share his material and the steps he has taken?
That would be helpful.
-
MODX Staff
- 12,272 Posts
You’ve definitely got something crazy going on. I’ve never seen such behavior. Given that, TVs are the most advanced part of MODx and probably the most powerful.
Please provide your server and MODx version information. Thanks.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
MODX Staff
- 10,725 Posts
For TV’s you define both the input method and the output method. Normally, unless you want to use the functionality of a display widget (say a Rich-text widget to display an editor on the front-end, or a Datagrid widget to output a table from a db), you would not select anything for this portion. I believe your issue with seeing the RTE in the front end is related to this. You select Rich-text, or textarea, etc., for the input type, which will determine how it is edited in the manager interface for each page that uses a template containing the TV, and leave the widget as blank to simply have the content display.
As for editing permissions with QuickEdit, I’m no expert on this portion. Perhaps Adam (or another savvy QuickEdit user) can direct you to the proper information on this?
Just a remark:
Maybe the name "Template Variable" is misleading. It’s not a variable for the template (since it doesn’t alter the template’s behaviour or elements) but for the pages which use that template, so calling it a Page Variable (PV) would have been better.