Page list controller modify

Permalink
Hi,

I would like to filter the results of the page list block.
I use this code in the controller of the block:
$tag = "something"; //<-- the tag you want to search for
$pl->sortByDisplayOrder();
$pl->filterByAttribute('type', "%\n" . Loader::db()->escape($tag) . "\n%", 'LIKE');

after this line:
$pl = new PageList();
$pl->setNameSpace('b' . $this->bID);


This works perfectly, but I would like, if the $tag could be changed, when I submit a form in the block.

Thanks for your help!

 
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
if ($_GET['query']) {
   $this->set('query', $_GET['query']);
   $pl->filterByKeywords($_GET['query']);
}


Note: "query" will be the tags that you submit through form.

Rony
leventekorponai replied on at Permalink Reply
Thanks for your reply, but where should i paste this code, because this line
$this->set('query', $_GET['query']);

drops an error.

Levente