Question: In Magento 1.9 I would like to filter the products returned by the layered navigation.
The collection should be filtered if the name contains a string passed through a parameter in the querystring, if present.

How can I achieve this results? Should I extend some layered navigation classes?

Answer: 
You cannot filter by names because Layer navigation only support attributes such as prices, drop-down or multi select.
This can be achieved by extending Mage\_Catalog\_Block\_Product\_List class.

This is my extended class

```
class Custom_Catalog_Block_Product_List extends Mage_Catalog_Block_Product_List{
    protected function _getProductCollection(){
        parent::_getProductCollection();
        $this->_productCollection->addAttributeToSelect(array('image', 'url_path'));
        // filter search string
        $q = Mage::app()->getRequest()->getParam('q');
        if($q){
            $this->_productCollection->addFieldToFilter('description', array('like' => '%' . $q . '%'));
        }

        return $this->_productCollection;
    }
}

```