I have a simple question, at least to someone familiar with the source code of CMSMS:
from index.php, the function get_pageid_or_alias_from_url() is called (lib/page.functions.php)
Here the global variable $_REQUEST is populated with parameters from the (pretty) URL if a route can be matched.
I assumed that when the module that registered the route is subsequently called from within the template, the variable $params it receives, contains the relevant key => value pairs taken from $_REQUEST.
But it doesn't.
Adding the code below to action.default.php of the module (in this case Gallery)
Code: Select all
print_r($params);
print_r($_REQUEST);
Code: Select all
Array ( [module] => Gallery [action] => default )
Array ( [page] => Gallery/'folder'/'returnid'/ [cntnt01dir] => 'folder' [cntnt01returnid] => 'returnid' [cntnt01action] => default [cntnt01module] => Gallery [mact] => Gallery,cntnt01,default,0 )
So, although $_REQUEST contains the correct parameters dir and returnid, $params does not.
The Gallery module (by Jos) does check for $params['dir'] at several places in its action.default.php, never for $_REQUEST['cntnt01dir'].
Does anyone have previous experience with params from pretty URLs being extracted correctly by get_pageid...() but not being passed to the module?
It would be a great help if someone could just point to where (which CMSMS source file (and function)) the key => value pairs from $_REQUEST are copied to $params available to the module.