Zend + TinyMCE use view variable in tinyMCE dialog; how to retreive the view variable for a file outside the zend framework?
I' creating a plugin for tinyeMCE, in which the user can select a list of pages from the CMS.
I retreive the values from the database and pass these to the view file. This works on the page itself. Now I want to use this in the dialog screen of tinyMCE. The plugin uses a .php file with the dialogs content. I'm unable to use the $this->variable
like I would normally use.
So the (bigger) question is: How do I access the view variable from outside of the Zend Framework? (or be part of the Zend Framework?)
Additional info to answer
Found out, that using the code below is possible to call an action from zf:
ed.addCommand('mcepagelink', function() {
ed.windowManager.open({
file : url + '../../../../../admin/tinymce/pagelink',
width : 320 + parseInt(ed.getLang('pagelink.delta_width', 0)),
height : 200 + parseInt(ed.getLang('pagelink.delta_height', 0)),
inline : 1
}, {
plugin_url : url, // Plugin absolute URL
some_custom_arg : 'custom arg' // Custom argument
});
Going back roots is off course depending on you application structure
I would suggest pointing the URL for your plugin at a Zend Framework page instead. That way you can use the same (or similar) code, and use the view variables as normal.