Code: Select all
$page_url = $this->CreateFrontendLink($id, $return_id, 'process_choice', '',
array('option' => $setting), '',
true);
echo "<a href='".$page_url."'>[choice X]</a>\n";
From what I can see, the 'action' passed to CreateFrontendLink is never automatically invoked, and the only reason that the FrontEndUsers "logout" link works is because I have a global content block with this Smarty tag in it:
Code: Select all
{cms_module module=FrontEndUsers}
Code: Select all
{cms_module module=MyModule action='choose.php'}
Is this the way things are meant to work? I was hoping that CMSMS would pass control to the "action" I specified in CreateFrontendLink(), before it rendered any content. For one thing, the action writes to a field in the database that one of my global content blocks reads from every time the page is loaded, so I was hoping to have that field updated before the global content block was rendered, so that the user's choice of option takes visible effect immediately.
But maybe I'm just not understanding the distinction between an "inline" link and a non-inline. Is this documented somewhere? If so, could someone point me to the documentation? If not, could someone kindly explain the difference to me?
When I set CreateFrontendLink()'s parameter "inline" to false, then action.process_choice.php is executed. It's still not executed before content is rendered, though, so my global content block still has the old value of the setting.
Is there some more straightforward way for me to achieve what I'm after? I.e., for the user's choice to be processed before the main content area of the page is rendered?
Thanks, Ben