cancel
Showing results for 
Search instead for 
Did you mean: 

add routers page products list

add routers page products list

Hello, I create a router from a module. So put a page from frontend.

Example:

config.xml

<routers>
        <searchpage>
            <use>standard</use>
            <args>
                <module>Module_Searchpage</module>
                <frontName>searchpage</frontName>
            </args>
        </searchpage>

indexcontroller.php

class Module_Searchpage_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        //Get current layout state
        $this->loadLayout();          
 
        $block = $this->getLayout()->createBlock(
            'Mage_Core_Block_Template',
            'newpage',
            array('template' => 'catalog/product/listpage.phtml')
        );
         
        $this->getLayout()->getBlock('root')->setTemplate('page/2columns-left.phtml');
        $this->getLayout()->getBlock('content')->append($block);
        $this->_initLayoutMessages('core/session');
        $this->renderLayout();
    }
}

there is working, show the list products, but not working the left leyered navegation ajax.

The leyered navegation ajax is woking from catalog_category and catalo_catalogsearch

I create a controller :

 

require_once 'Mage/Catalog/controllers/ProductController.php';

class Module_Layerednavigationajax_ProductController extends Mage_Catalog_ProductController {

But, I don't have a idea, how can add the filter from page.

2 REPLIES 2

Re: add routers page products list

Hi @elizondo82,

 

It won't so so easy because there are another blocks that needs some specific type of data.

Can you share the layout definition for that controller/url?

Re: add routers page products list

@Damian Culotta, I put the catalogsearch, there I put a filter where can change option id.
But, thanks fro you help