rekarnar. the next attempt.
When returning a rendered partial from an action like:
return $this->renderPartial('action/partial');
you can use all the $this->variables assigned in that action in the view, UNLESS you pass an array of them into the partial:
return $this->renderPartial('action/partial',array('var'=>'this stops us using any this->vars'));
which then becomes all you can use in there.
Just got dev status on the modal plugin and have released a new updated version. You can check it out here: http://www.symfony-project.org/plugins/sfModalBoxPlugin
When you change the name of a project in symfony (im using 1.2.9) and then change all the refrences to it aswell, sometimes you will also have an issue with some cached paths. Tooks me ages to work this out. I would keep getting an error pointing to the old path. It is because the:
require_once dirname(__FILE__).'/../lib/BaseMyPluginModuleActions.class.php';
from my plugin was not being re-called. I had to add:
echo dirname(__FILE__);
above the call to get it to update.
Simple fix, but annoying as hell to workout.
When using sfModalBoxPlugin version 1.0.1 and you are getting the following error (because some methods are changed/depreciated in symfony 1.2)
Fatal error: Call to undefined function _options_for_javascript() in /var/www/myproject/plugins/sfModalBoxPlugin/lib/helper/ModalBoxHelper.php on line 120
You need to remove the underscore from the function name. Eg: change _options_for_javascript to options_for_javascript
UPDATE::
Ahh there is also two paths that you can change to make it work a little nicer with symfony:
first, change line 35ish in modalbox.js to:
closeValue: "<img style='border:0px' src='../../web/sf/sf_admin/images/cancel.png'/>", // Default string for close link in the header
and second, change line 60ish in modalbox.css to:
background: transparent url(../../sfModalBoxPlugin/images/spinner.gif) 50% 0 no-repeat;
Thats basically it. Plugin changes done, all symfony 1.2 compatible!
UPDATE2::
Infact, after doing these changes I still had one issue. The focus change when pressing tab was not working. I ended up getting the new modal code from the source and updating the whole plugin with it. So basically, to save some hassle (the above stuff), and to get a wayyy nicer modal experience (as heaps of things have been improved) use this: here. (untill the plugin gets updated in the repo of course)
Hey does anyone have a nice solution for using edit in place with the full form stack in 1.2?
Last time I had to do this was back in 1.0 when we could just input_in_place_editor_tag to our hearts content. But really, its just not upto scratch these days.
or is it? am I missing somthing?