-
MODX Staff
- 12,272 Posts
(admin note: split from another thread)
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
☆ A M B ☆
- 24,524 Posts
Probably the best source for information in which is what would be the manager/includes/tmplvars*.php files; there are three of them.
tmplvars.inc.php handles basic TV stuff, like making the fields. This is the one you are interested in; it has a switch() statement where you can find all of the input types.
tmplvars.commands.inc.php handles @ bindings.
tmplvars.format.inc.php handles the output widgets.
Unfortunately the mutate_content.dynamic.php file is mixed HTML and PHP, with the TV fields for the template being generated on the fly, so you can’t use a plugin with the OnDocFormPrerender event to create custom TVs. While you can use snippets to provide custom output widgets, there is no way to have custom input types without hacking the tmplvars.inc.php file.
-
☆ A M B ☆
- 24,524 Posts
I am in the middle of an email exchange with somebody who just managed to get the "file" input type to point the resource browser to the assets/flash folder; I haven’t gotten his response to my plea for the explanation of how he did it.
-
☆ A M B ☆
- 721 Posts
Thanks for the info. I will proceed to redefine our standard base install without the need for a base database. Great stuff!
-
☆ A M B ☆
- 24,524 Posts
All he did was change the "type" designation in the javascript for the Files case in the tmplvars.inc.php file. I’ve posted an improvement in Jira for two simple changes to add a "flash" input type for TVs.
hey. i have some trouble with my tv file during the install...
/**
* meta-robots
*
* Robots
*
* @category tv
* @name meta-robots
* @internal @caption Meta Robots
* @internal @input_type dropdown
* @internal @input_options index,follow||noindex,follow||noindex,nofollow||index,nofollow
* @internal @input_default index,follow
* @internal @template_assignments standardTpl
* @internal @modx_category Meta
*/
Error Msg:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’’index,follow||noindex,follow||noindex,nofollow||index,nofollow’,’’,’’,’index,fo’ at line 1
any hints?
christian seel - www.christianseel.com
web developer & designer at chsmedien.de
twitter: @christianseel / @chsmedien