I have created another ticket.. there are two issues that crop up with this.. it seems as though right now.. we can only use one view class for the entire site. That means that if you use smarty.. you will have to convert all your plugin modules/templates to smarty as well.. its a hassle and obviously not the desired functionality.
http://trac.symfony-project.org/ticket/5198 The ticket addresses 2 issues.. the second issue is resolved with the code change (similar to the above code I posted but that still was not correct) .. however issue #1 remains. If you do specify for a specific module a view_class of sfPHP .. it will now attempt to load your default layouts using sfPHP instead of Smarty. Since the root level module.yml specifies Smarty.. default layout should ALWAYS be loaded with Smarty (or whatever view class is specified in the default module.yml file) Jesse On Dec 6, 6:05 am, Jesse <[EMAIL PROTECTED]> wrote: > Hi just saw a ticket that was opened regarding this problem 10 months > ago.. it seems fabian closed it without giving a reason.. > > http://trac.symfony-project.org/ticket/2878 > > im not sure why it was closed.. but it seems as though this is whats > needed.. Ill try checking on my side bug suggest you look at the patch > file and see if that helps > > Jesse > > On Dec 5, 6:13 am, Mr_chon <[EMAIL PROTECTED]> wrote: > > > That's what I thought as well but it doesn't work (in my case > > anyways). > > > Whatever I write in the module.yml file ("all:", "default:", > > "mymodule:") and whatever folder I put it in (app/config, module/ > > config), the configuration is not pre-loaded. > > > The problem occurs with include_component and include_partial when the > > called component or partial is in a different module. > > > Mr_chon > > > On 5 déc, 11:42, Jesse <[EMAIL PROTECTED]> wrote: > > > > Hmm.. I believe all the yml's get read and cached on the first site > > > request.. why dont you just check if the module setting is there > > > sfConfig::get('mod_'.$moduleName.'_partial_view_class); .. if that > > > value exists then its correct.. > > > > Jesse > > > > On Dec 4, 10:49 am, Mr_chon <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > What if a module (let's name it "module1") includes a component or a > > > > partial from another module ("module2") ? > > > > > I've noticed that module2's specific config isn't loaded and can't be > > > > accessed, so the default values are used. > > > > > Maybe I'm mistaken, but I think that makes this bug a tiny bit more > > > > complicated. > > > > Before the $config = sfConfig... parts (in get_partial and > > > > get_component) I added the following code to include the partial/ > > > > component's module config settings : > > > > > require($context->getConfigCache()->checkConfig('modules/'. > > > > $moduleName.'/config/module.yml')); > > > > > Mr_chon > > > > > On 4 déc, 16:27, Jesse <[EMAIL PROTECTED]> wrote: > > > > > > I Jumped the gun.. > > > > > > heres the fix > > > > > > Lines 214 and 139 of PartialHelper.php (this applied to sf 1.2) > > > > > > $config = sfConfig::get('mod_'.$moduleName.'_partial_view_class'); > > > > > if (empty($config)) { > > > > > $config = sfConfig::get('mod_default_partial_view_class', 'sf');} > > > > > > $class = $config.'PartialView?'; > > > > > > ----- > > > > > $view = new $class($context, $moduleName, $actionName, ); > > > > > $view->setPartialVars($vars); > > > > > > hope that makes sense.. I also reopened the ticket and pasted the fix > > > > > there as well. > > > > > > Cheers. (Also a slight update needs to be applied to sfSmartyPlugin > > > > > for 1.2) .. ill upload it to trunk and move trunk to a tag for 1.1 > > > > > > J > > > > > > On Nov 26, 12:26 pm, "Kiril Angov" <[EMAIL PROTECTED]> wrote: > > > > > > > I also want to know why this is the case. I had the same problem for > > > > > > sfHamlViewPlugin. The documentation states that now sfPartialView > > > > > > can > > > > > > be changed the same way sfPHPView can be changed, but that is > > > > > > obviously not true. I think Fabian Lange was the committer who > > > > > > implemented the configurability of sfPartialView. In the > > > > > > codehttp://trac.symfony-project.org/changeset/11482 > > > > > > > Thanks > > > > > > > On Fri, Nov 21, 2008 at 8:09 PM, kennedy <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi, > > > > > > > > I posted a topic for the same point on the forums and didn't got > > > > > > > any > > > > > > > answers. I hope I will received some feedback. > > > > > > > > I noticed that I cannot use a different partial view class than > > > > > > > sfPartialView for global partial. (i.e.: include_partial('global/ > > > > > > > mypartialtemplate')) > > > > > > > > This issue is due to the fact that the PartialHelper checks for a > > > > > > > module configuration. But the template is in the application > > > > > > > directly. > > > > > > > > I am using the sfSmartyPlugin (sfSmartyView, sfSmartyPartialView) > > > > > > > for > > > > > > > my frontend application. > > > > > > > > PartialHelper get_partial method > > > > > > > > $class = sfConfig::get('mod_'.$moduleName.'_partial_view_class', > > > > > > > 'sf').'PartialView'; > > > > > > > > This line always returns sfPartialView when the module name is > > > > > > > global. > > > > > > > > Should I open a ticket for that issue?? > > > > > > > > thanks, > > > > > > > kennedy- Hide quoted text - > > > > > - Show quoted text - > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -~----------~----~----~----~------~----~------~--~---
