Hello,
This is my first post here. I have a question regarding modx templates variables. Actually I am involved in the creation of websites that use edit areas (input and textarea elements) which have a special behaviour attached to these by using javascript. I would like to add two template variable types TextUrdu and TextareaUrdu to the list of available template variable types. These would be similar to Text and Textarea template variable type with only a small piece of javascript attached. I want to if this can be accomplished easily without hacking a lot of core files. Any help in this regards will be appreciated.
Regards,
Nabeel
-
MODX Staff
- 12,272 Posts
For now you’ll need to modify the /manager/includes/tmplvars.inc.php file
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Hi rthrash,
Thanks you for your prompt reply. I will be giving it a try. I will get back to you if there are any issues. If successful, I will also share my results here.
Regards,
Hello, I just wanted to say thanks. I was able to create a new template variable type and then use it in new documents. Actually I just had a look at the way Drupal’s Custom Content Creation (CCK) module works and it has a mechanism that allows you to create custom field types for it without hacking any core files. I wanted to ask if this functionality is something that is a part of the roadmap of Modx?
-
MODX Staff
- 12,272 Posts
Yes, though not for the immediate future in Evo 1.0 or Revo 2.0.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me