Hi all
Probably a basic question but can't find an usable answer...
I'm developping a CMP. As usual I develop it from outside MODx (as well explained in the rtfm case studies) and all is fine.
Now I need to provide with this CMP a new Template Variable (input and output types), and probably a plugin to handle some events on it and act with a custom DB.
So I browse through the forum and the rtfm, looked at the code from gallery ( I need something like the gallery item tv more or less), and others add-ons before diving...
A question still without any answer : How can I develop this TV (and the events I want to attach to it) from outside MODx and test it ? (How in example have my custom input displayed in the list of the input types, same with output, same question with the plugin...)
Any guidance will be helpful, the rtfm only mention the creation of custom input or output tv from inside MODx...
Cheers
Hey Romain,
Thanks for answering and pointing me to Cliche (I had explored its code too...) and yes it will be useful... But I feel really idiot now, my question is fairly more basic and elementary...
I am developping my Component from outside MODx (in let say "www/myComponent" and my Revo install is on "www/revo23" - WAMP install on W7). So to develop and test my compopnent, specifically the CMP's I had to set the 'magic settings' (as Shaun called them) directly inside MODx (namespace, etc...)... All of that works like a charm...
Now I want to create a new type of TV with its own input type and output type, fair enough I understand how it globally works and have a good idea of what I want to accomplish...
The wall I'm hurting on is how do I inform MODx that I add a new TV input type and have this new input type displayed in the list of available input types (like text, text area, image, etc... myIputType) keeping all my code outside of MODx with all the code of my Component...
I miss something here... I'm sure it's something elementary, and I feel stupid
Thanks
you will need this part in a plugin with the correct path to get your TV into the list:
$corePath = $cliche->config['core_path'];
switch ($modx->event->name) {
case 'OnTVInputRenderList':
$modx->event->output($corePath.'elements/tv/input/');
break;
case 'OnTVOutputRenderList':
$modx->event->output($corePath.'elements/tv/output/');
break;
case 'OnTVOutputRenderPropertiesList':
$modx->event->output($corePath.'elements/tv/properties/');
break;
Pff !
Basic as I said... (I guess I need some holiday ^_^)
Thanks for your help....
Cheers