Passing Single Page URL Param into Block (v8.1.0)
Permalink 1 user found helpful
Hi,
I have a single page:
/admin/remarks/add
...that has method/action in the controller called "member":
/admin/remarks/add/member
I am passing 2 Express Entity values on the URL - the first being the express form object and the second being the ID of the entry:
/admin/remarks/add/member/b7d9eee7-d93f-11e6-90f3-0a0027000006/36
In the single page I have added an Express Form. I am attempting to extend the block controller to read the action and get the params so I can use them in the block. I am following this example (see link at the end), and for the life of me can not get action_member to fire. Even if I set a hard-coded value it doesn't render in the view.
My Express Form block controller override:
I can get the $eID from the URL in the single page controller and render it to the view with no problem.
Single Page controller:
Any idea what I am doing wrong? Or is this a bug?
https://documentation.concrete5.org/developers/working-with-blocks/c...
I have a single page:
/admin/remarks/add
...that has method/action in the controller called "member":
/admin/remarks/add/member
I am passing 2 Express Entity values on the URL - the first being the express form object and the second being the ID of the entry:
/admin/remarks/add/member/b7d9eee7-d93f-11e6-90f3-0a0027000006/36
In the single page I have added an Express Form. I am attempting to extend the block controller to read the action and get the params so I can use them in the block. I am following this example (see link at the end), and for the life of me can not get action_member to fire. Even if I set a hard-coded value it doesn't render in the view.
My Express Form block controller override:
namespace Application\Block\ExpressForm; class Controller extends \Concrete\Block\ExpressForm\Controller { public function action_member($fID, $eID) { $this->set("id", $eID); $this->view(); } }
I can get the $eID from the URL in the single page controller and render it to the view with no problem.
Single Page controller:
namespace Application\Controller\SinglePage\Admin\Remarks; use Concrete\Core\Page\Controller\PageController; class Add extends PageController { public function view() { $this->set('pagehead', 'Add Remark'); } public function member($fID = null, $eID = null) { $this->set('eID', $eID); $this->view(); } }
Any idea what I am doing wrong? Or is this a bug?
https://documentation.concrete5.org/developers/working-with-blocks/c...