We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13094
    • 58 Posts
    When clicking on an ajaxSearch result link, I get several parameters, e.g. for highlighting.
    But... if the found page got its content from somewhere else (maybe from DynamicDiscription or so) or it is a FCR page that points onto another page FCR strips off the parameters at all.

    Due to the fact, that I use FCR as a TV on some pages (just for users comfort) I can’t add that parameters from page to page manually.

    I tried to modify the FCR snippet, but I’m not sure if that is the appropriate approach:

    $urlQuery = '';
    foreach ($_GET as $key => $value) {
      if ($key != "q") {  // ignore this particular $_GET value -- friendly url redirect?
        $urlQuery .= (($urlQuery == '') ? "&" : '') . $key . '=' . $value;
      }
    }
    
    return $modx->sendRedirect($firstChildUrl . (($urlQuery != '') ?  "?" . $urlQuery : ''));
    


    Feedback welcome.

    Kind regards,
    iRolf