1. I have tpl files and need to get variables values from on page to another. Is there some correct way to do this or controller file should be on both pages.
Possibility is also GET function where needs to be read this variable(s):
foreach($_GET as $key=> $value){
echo '$_GET[' . $key . '] = ' . $value . '\r\n';
}
What should be placed in tpl and what inside PHP (controller files)
2. Reading page name within Smarty platform
Is there any solution to read page name with this platform or there is a way like:
$searchURL = $_SERVER['REQUEST_URI'];
echo '<br /><br />'.$searchURL;
$searchterm = $_SERVER['SCRIPT_FILENAME'];
echo '<br /><br />'.$searchterm;
//includes FOLDERS and FILE EXTENSIONS
function curPageName() {
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
}
echo '<br /><br />'.'The current page name is '.curPageName();