J!2.5 Not show filters/ search all in public and show in admin

I know when you have filters, for an element, you can set access to registered/public/ etc
however, what about advanced search or search fileds.. I need them for the admin, but not on the public view.


I have done this by adding the following to the template code, but it would be nice to add access restriction to the list parameters!

Code:
// get the URL like we did in the alpha filter
// so we can hide the filters on the services and specialties and physician lists
// strip out all stuff and get only the part we need
    $uri_parts = explode('?', $_SERVER['REQUEST_URI'], 2);
    $url = $uri_parts[0];
    $pathparts = explode('/',$url);
    $this_list = $pathparts[1];
 
    if( strtolower($this_list) != "services" && strtolower($this_list) != "specialties" && strtolower($this_list) != "physicians"){
        if ($this->showFilters) {
            echo $this->loadTemplate('filter');
        }
    }?>
 
Yeah, one of those "it'd be nice if ..." things, but would add YAFO (Yet Another Option) to an already crowded set of options. So, something which might happen one day if enough people ask for it, but for now, you have a workaround.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top