6 users online. Create an account or sign in to join them.Users
adding custom page param
This is an open discussion with 22 replies, filed under Troubleshooting.
Search
An uninstall and install did the trick, doh! Thanks for your help!
Glad i could help :).
Create an account or sign in to comment.
OK, if
$this->_paramdoes not contain parameters generated by Your extension then maybe extension's callback is not called at all?Did You uninstall and install extension again, after implementing
getSubscribedDelegates()function? Unless i'm mistaken, delegates are subscribed only when enabling extension, so maybe Symphony does not know that Your extension wants to add some parameters :).If uninstalling and installing again will not help, try to change function to look like this:
public function addParam($context) { $sets = $this->getSets(); var_dump("adding parameters....\n"); var_dump("sets are:\n"); var_dump($sets); foreach ($sets as $set) { if(!$this->isPageSelected($context['page_data']['id'], $set['id'])) { $parameters = $this->getParameters($set_id); foreach ($parameters as $parameter) { $context['params'][$parameter['param']] = $parameter['value']; } } } var_dump("\nadded parameters, context should now contain:\n"); var_dump($context['params']); }