Search

My extension depends on Language Redirect and I need language and region URL parameters which are set in the .htaccess file.

This is the function that implements the FrontendPrePageResolve delegate:

public function frontendPrePageResolve($context) {
    1. $country_code = $url-language.'-'.$url-region;
    2. $lhandle = 'something'.$country_code;
    3. query the db for $lhandle and fetch $db_data
    4. $context['page'] = $db_data;
}

Is there a way to see the URL parameters inside the FrontendPrePageResolve delegate?

The delegate FrontendParamsResolve gets called after the page is resolved so it’s not good. I need access to the parameters before the page is resolved.

Thank you.

System parameters and URL Parameters aren’t created created until after the FrontendPrePageResolve delegate has fired.

URL Parameters are just a fancy $_GET array, so you can already get them, at least in this case via $_GET['language'] and `$_GET[‘region’].

You can then query the database and refill the $row array, all from within the FrontendPrePageResolve delegate.

I guess you can access $_GET['symphonypage'] and explode it by /. Those parameters will not be named though (as opposed to the ones in your pages).

lol … $_GET :))

thanks for the reminder.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details