Closed Bersman closed 12 years ago
Other solution that I use is: Line 76: 'attributes' => !array_key_exists('attributes', $parameters) ? $parameters : $parameters['attributes'],
Thanks for reporting this issue and thanks for alerting me via twitter. I'll try to reproduce this and provide a fix.
@Bersman please check if the latest commit fixes your problem. The syntax for the render
function has changed. The documentation was updated to reflect this changes. Usage examples:
Using a block function:
{render attributes=['min'=>1,'max'=>3]}AcmeArticleBundle:Article:recentArticles{/render}
Using a modifier:
{'AcmeArticleBundle:Article:recentArticles'|render:['min'=>1,'max'=>3]}
I'm on holiday from work. So can't check. I will @ august.
@Bersman OK, have a nice holiday!
Its working :) Thank you for fixing it.
Hello,
im using {render menutype='mobile'}WebsiteBundle:Menu:list{/render} Now im getting an error: "MenuController::listAction()" requires that you provide a value for the "$menutype" argument (because there is no default value or because there is a non optional argument after this one)"
Between step 8 and 9 im losing the parameters. "at ActionsHelper ->render ('WebsiteBundle:Menu:list', array(), array())
in ***/vendor/bundles/NoiseLabs/Bundle/SmartyBundle/Extension/ActionsExtension.php at line 80 -+ at ActionsExtension ->renderAction (array('menuype' => 'other'), 'WebsiteBundle:Menu:list', object(Smarty_Internal_Template), false) "
When I go to the bundles/NoiseLabs/Bundle/SmartyBundle/Extension/ActionsExtension.php at line 80 I see that attributes and options are merged with parameters and are set as an empty array.
The problem is that the listAction listen to those to. A short 'fix' is to put 'attributes => $parameters
But that is not a nice fix. Do you known a better one ?