I just forked the {redirect_page} plugin and added a goback=true parameter which grabs the current page alias and adds it as query variable to the redirect URL.
Code: Select all
$query_vars = '';
if( !empty($params['goback']) )
{
$contentops = cmsms()->GetContentOperations();
$content_obj = $contentops->getContentObject();
$thisPageAlias = $content_obj->Alias();
$query_vars = '?redirect='.urlencode($thisPageAlias);
}
if ($content->GetURL() != '') redirect($content->GetURL().$query_vars);
Code: Select all
{if !empty($smarty.get.redirect)}
{cms_module_hint module=MAMS returnto={$smarty.get.redirect|urldecode}}
{/if}
However, on the original page (before login), I already have some query variables which I'd like to pass along. The passing to login page is easy but I don't know how to overwrite the MAMS return URL and set/keep the query variable as well. Is this possible or would this be a feature request?