hi all, i'd like to gather your opinions on a small-ish change of the symfony code but before I want to shed some light on my current situation which lead me to propose this.
I am currently developing a plugin with a bunch of modules and other functionalities. this plugin should later be passed to different projects. the functionalities are provided via components that can be included within the application. now because all these other projects do already exist it will not be possible to write semantic markup which can be included everywhere. it is far more likely that different projects want different markup for the same module/functionality. now the problem here is that the markup is defined in the partial templates living in the plugin folder and should of course not be altered. now I thought it would be nice to be able to overwrite/shadow the templates by creating them somewhere with the application. (soemwhere in /apps/<app>/templates came to mind) but to use that directory instead one has to call sfPartialView::setDirectory(). unfortunately the instance for this is only locally stored within the helper function include_component() and is created after the component code has been executed. my proposal is: ..to change this helper function to instanciate sfPartialView before the component code is executed and to making this instance available to the component so that changed for example to the instance can be done from the component itself. or maybe these instances should better be registered with the current context? maybe availabe using something like sfContext::getCurrentPartialViewInstance() ? another solution would be to create a new kind of view.yml or to extend the existing so that components/partials could be configured individually. a special config key 'template_dir' could be introduced but that might be better off in module.yml.. anyway a view.yml for components/partials would be great because you could for example add partial specific stylesheets and javascript like you do with action templates, which is far more coherent than having to use addStyleSheet(). anyway what do you guys think about this? I think the cost of implementing this would be fairly reasonable while the benefit would be immense gaining control over the template from within a component. I would gladly be of service to submit a patch for this if an inclusion of such a functionality in symfony would be cosidered. or maybe there is an easy way to achieve what I'm after that I missed somehow? tell me what you think. cheers /christian --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
