Landing pages module for Magento

One of the most powerful features of Magento is it flexibility. With the CMS functionality you are able to create very SEO friendly static pages in an easy way. There’s one issue though: by default Magento lacks a good way of including a group of products on a page if they are not all products from one single category.

You can include some dynamic content, e.g. all products from one category. Just add the following block to your CMS page to show all products from the category with ID 8 on a static landing page:

{{block type="catalog/product_list" 
    category_id="8" }}

Now wouldn’t it be great if you could also filter the products on attribute value? For instance to show all black cell phones on a static page? Well, now you can! With this new Magento landing page module you will be able to do this in a very easy way. Just download the module and copy it to the root of your Magento install. After this you will be able to show all black cell phones (this example is using the Magento sample data) by simply adding this block to your CMS page:

{{block type="Yoast_Filter/Result" 
    category="8" }}

Go to your newly created CMS page and you will see a page with all black cell phones. Now it is time to optimize your landing page with some good unique content, a nice title, search engine friendly url, some header tags and you will have a very seo friendly Magento landing page. In the same way you can filter all products on attribute value and/or category. So for a optimized landing page for all Apple Computers just create something like this example:

Example of the Magento Landing Pages module, click for larger version.

Example of the Magento Landing Pages module, click for larger version.

Dynamic attribute filter pages

Well designed pages created by hand with unique content will outperform dynamic generated ones, but it is a hell of a job to create 10k landing pages. So another great feature would be the option to create dynamic pages for each value of an attribute. After the installation of the module and the Magento demo data installed you can go to and you will get all black products on one page.

As you can see the url start with /f for calling the module name, /color is the attribute name and /24 is the value of the attribute. For drop-down and multi-select attributes this is a number (the ID of the attribute value), for text attributes it’s the textvalue. An example URL of a text attribute for the Magento demo data would be

Extending your Landing Page with static content

A page without content isn’t very SEO friendly. The Magento CMS uses static blocks for text blocks. When you create a block with the identifier landing-$attribute-$value this block will be added to the above the product listing. So for the example above you should create a static block with the identifier landing-color-24 and voila, the static block is added to the page

Layered Navigation for landing pages

Update 11-1-2010 Now it is even possible to add layered navigation to the landing pages. By default this is enabled for the dynamic pages, you can change this by editing the filter.xml. For the CMS pages you should add something like the following code to the XML update (note the setAttributeName and setValue):

<reference name="content"> 
<block type="Yoast_Filter/Result" name="filter_result" template="catalog/product/list.phtml">
<action method="setAttributeName"><attribute_name>color</attribute_name></action>
<action method="setValue"><value>24</value></action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager" template="page/html/pager.phtml"></block>  
 <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
<reference name="left">
<block type="Yoast_Filter/Layer_View" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"></block>


So you were probably wondering by now, but You can download the module right here or install it through MagentoConnect.

Need help?

Of course, if you want to use this Landing Page module in your Magento install and would like us to help set it up, use the hire me form and let us know!

Even better SEO with Yoast SEO Premium!

  • Optimize your site for the right keywords for your users
  • Avoid dead links in your site
  • Get previews for sharing on Twitter and Facebook
  • Content quality and link suggestions as you write
More info

59 Responses to Landing pages module for Magento

  1. paul
    paul  • 10 years ago

    is there way to automatically create landing pages for the manufacturers listed in my store?

  2. Soam
    Soam  • 10 years ago

    Hey buddy,
    Im trying to do my Brands Listing on my sidebar, so that all of my Brands get this type of URL,

    So, can we do it with this ?
    Let me know please. Thanks..

  3. David
    David  • 10 years ago

    Hey there, thanks for a great plugin. Just thought I´d mention that I would really like to have this module featured as a Magento widget. That would be absolutely beautiful!

  4. Fred
    Fred  • 10 years ago


    I’m trying to make the module work for multi-select/drop-down option values as Jonathan’s addition should allow it but I can’t find the line I am supposed to replace with his code.

    When editing the end of the View.php file it doesn’t work and I’ve been looking at the different files for a few days without being able to find out what to do.

    Would anyone please help ?



  5. Steve L
    Steve L  • 10 years ago

    Hi There,

    We have used this to form several landing pages we use the SKU to pull in individual products. The problem is I fear it may be causing a memory leak as since using our memory usage on the magento site has shot up. We are using this around 9 times on the page. Could this cause the problem?


  6. Gary
    Gary  • 10 years ago

    Very useful addtion – thanks making it available to the community. Would like to be able to show multiple categories on one landing page. Is this possible somwhow?

    • Joachim Houtman

      Without a category_id value the modules filter all your products. To filter on more than one, e.g. two categories is not possible or you should change the way Magento Core handles the category values.

  7. Andre
    Andre  • 10 years ago

    Nice work, nice extension!

  8. zerax
    zerax  • 10 years ago

    Can i use the block code {{block ... elsewhere then in a CMS block ?
    Can i use it in a Static block ? it seems not…

    Thks for your extension whch is very usefull for me : i can really manage easily my home-page with a simple attribute : appear on home page :)

    • zerax
      zerax  • 10 years ago

      I try to use this extension to make a list of products in the footer. Is it possible to do so ?

      • zerax
        zerax  • 10 years ago

        I’ve found my mistake… I can’t use it in a static block, but if i use it in a layout then i can desactivate it where i want …
        Thks for your very usefull extension :)

  9. Florian Krebber
    Florian Krebber  • 10 years ago

    Having the same problem as PJ here. Getting a 404 error if i am trying to use dynamic pages. Do i have to create a cms page first for this or what? Thanks a lot for replies.

    • Florian Krebber
      Florian Krebber  • 10 years ago

      Sorry, overred the cache thing. Now it works just fine!

  10. paul
    paul  • 10 years ago

    hi there. LOVE this extension. really what i needed. Anyways on the dynamic loading pages, the category title isn’t in english. here’s what i’m talking about

    • Joachim Houtman

      Thanks, you were right. The module is updated to English.

  11. PJ
    PJ  • 10 years ago

    Seems easy enough. I’ve uploaded all the files in a default magento install with the sample data and can’t get anything to show up. The block to show all products in category_id=8 works fine, but nothing shows with
    {{block type=”Yoast_Filter/Result” name=”filter_result” template=”catalog/product/list.phtml” attribute=”color” value=”24″ category=”8″ }}.
    And if I go to /f/color/24/, I get a 404 error.
    Any ideas?

    • Joachim Houtman

      Are you sure you cleared your cache?

  12. Magento Developer
    Magento Developer  • 10 years ago

    I am working on new shopping cart website which built with Magento ecommerce. Your Post is very helpful for our SEO Department for Landing page development in Magento. Thanks for writing magento SEO tips.

  13. Vasilis
    Vasilis  • 10 years ago

    Perfect module. Can anyone please tell me where can i found the files that control that module so
    i will change local launguage messages? Thank you

  14. Thijs van Schadewijk
    Thijs van Schadewijk  • 10 years ago

    Hi Jonathan – you’re extremely helpful with your comments. Many thanks – will update the code in order to allow multi-select. This makes the extension much more useful for certain shops.

    Thanks again!


  15. Jonathan Day
    Jonathan Day  • 10 years ago

    Hi again,

    Worked out how to allow multi-select/drop-down option values in the URL, replace the last line of View.php with the following:

                   $optionID = array_search($value,$this->getAttributeValues());
    			return $value;
    		return $optionID;
    	public function getAttributeValues()
    		$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', $this->getAttribute());
    		foreach ( $attribute->getSource()->getAllOptions(true, true) as $option)
    			$attributeArray[$option['value']] = $option['label'];
    		return $attributeArray;

    That will still search by option ID if the option Value is not found.


    • Fred
      Fred  • 10 years ago

      Thanks Jonathan for republishing your code.

      I edited the View.php with these lines.

      With this addition, the module seems to work for multi-select attributes if only one option is selected for a particular product.
      Any product with several options selected in a multi-select attribute won’t be found using the following syntax :

      If you could solve this last problem, the module would be really useful for the site I’m working on.

      Hope to read you soon !


    • Fred
      Fred  • 10 years ago

      Hi Jonathan,

      The ability to use multi-select attributes that you added perfectly matches my need.
      But I can’t find the View.php file I’m supposed to edit : the file included in Joachim’s extension doesn’t seem to be the right one or am I wrong ?

      Could You please give me a hint / path as to which exact file I should edit to make it work ?


  16. Forrest
    Forrest  • 10 years ago

    Thank you as this module fills in a major hole our websites functionality.
    Sadly I am having trouble implementing it on out test site. The module loads the designated category, but does not appear to be filtering the list by the designated attribute. If I remove the category it loads the entire catalog. I am using the following block. “{{block type=”Yoast_Filter/Result” name=”filter_result” template=”catalog/product/list.phtml” attribute=”manufacturer” value=”101″}}” I get the same result if I navigate to “/f/manufacturer/101/” On the other hand if I navigate using layered navigation it works.

    Again thanks for the extension and thanks for any help in advance!

  17. Bryan
    Bryan  • 10 years ago

    I’ve just started using magento and this will surely be a big help to me. Thanks for this!

    Really love what magento can do. Hope to see more article about magento.

  18. Ralf
    Ralf  • 10 years ago

    Thanks for this great extension! But I have a problem with it. I have installed the newest Magento version. I have an multiple select attribute with more than one options selected. If I try to filter for one of this option with your extension I will retrieve no result. If I have only one option selected within the product zhe product is shown properly. I hope you understand my issue. Can you give me help with this? Thanks in advance!

  19. Ken
    Ken  • 10 years ago

    Thank you Joachim,

    I was wondering if it possible to create a layered navigation that shows accurate results even after filtering with yoast? Which will be custom code ofcourse.
    When i yoast filter with black it shows all black items, but the layared navigation still allows me to filter accurately through the filterd items in the CMS landing page.

    Look forward hearing from you.

  20. Hardik
    Hardik  • 10 years ago

    Thanks Joachim!

    We needed to filter products by brand attribute ( Reebok,Puma,adidas… )..

    it worked perfectly as we needed.


  21. Jason Vance
    Jason Vance  • 10 years ago

    Has anyone used this to redirect an advanced search query such as: to

    I love the idea of using the URL Rewrite management to rewrite the advanced query. However, I’m having no luck with what should be in the ID Path & Request Path.

    Anyone whom could point me in the right direct?

    I love the extension!

  22. Ken
    Ken  • 10 years ago

    Thank you so much for this!!! It has solved a big issue for us so thanks!
    I have one question though, is it possible to add a sorting value in this string? I want to show products by attribute X and sort them by Atrribute date for example. Looking forward hearing from you.

    • Joachim Houtman

      Yes that is possible but you will need to add some custom code. You should extend Yoast/Filter/Block/View.php with some code to sort the products by date. Something like

      $collection->setOrder('date', 'ASC');
  23. Daniil
    Daniil  • 10 years ago

    Hi, is there a way to display layered navigation on these landing pages so customers can filter by other attributes? Thanks.


    • Joachim Houtman

      No, not by default. With some custom coding will it be possible, ofcourse.

      • Daniil
        Daniil  • 10 years ago

        would you point me in the right direction? I just need to display the layered navi on the landing pages I created. Thanks in advance.

        • Jonathan Day
          Jonathan Day  • 10 years ago

          Thanks Joachim, this is awesome. I’ve made a couple of tweaks to your (nice) code to help those who want to use a word other than “f” as the Filter prefix. In Router.php, insert the following:
          const FILTER_URL_PREFIX = 'browse'; immediately before initControllerRouters, and then change line 10 to be:
          $front->addRouter(self::FILTER_URL_PREFIX, $filter);
          and line 23 to be:
          $route = self::FILTER_URL_PREFIX;

          I’m trying to work out how to use the attribute values in the URL for multi-select/drop-down values, that would be perfect for SEO.

          Thanks again!

          • Jonathan Day
            Jonathan Day  • 10 years ago

            Hi again, I found an extra step that is required. In the config.xml, the frontName of the router needs to be changed to whatever value FILTER_URL_PREFIX is, otherwise this can cause issues with further development. This is on line 40.

            I’m working on the Layered Nav, though I think it’s going to be quite a challenge!

            Cheers, JD

        • Jonathan Day
          Jonathan Day  • 10 years ago

          Hi Danil, If you have a look at the Layered Nav code under the CatalogSearch module, that will give you some direction. Especially the core\Mage\CatalogSearch\Model\Layer.php file.


  24. Jim Press
    Jim Press  • 10 years ago

    Interesting, I have been tossing up between magento and a couple of other ecommerce open source products. This was one of the areas concerning me. Might just have swung me towards magento, so thanks for this.

  25. Jimmy Jørgensen
    Jimmy Jørgensen  • 10 years ago


    Thanks for this very useful info. One question tho. Is it possible to use it for showing new products?. If which “code” do i have to enter?.

    • Joachim Houtman

      Thanks. No, it will not work for new products. You can give this block a try:

      {{block type="catalog/product_new" template="catalog/product/new.phtml"}}

  26. manuel tato
    manuel tato  • 10 years ago

    I’m Working in a new version of my ecommerce site, yoast has been very usefull, thanks a lot!

  27. Surus
    Surus  • 10 years ago

    A fundamental question. I will make e.g. 10 landing pages. Does it make sense for google to make it accessible? If i make, for example, in footer a category called “landing pages” and add links to all landing pages there? Google will indexing all this pages. Is it correct?

    • Adam
      Adam  • 10 years ago

      Yes, Google will index any page it can reach via any link from the root of the site (index page)

  28. DG
    DG  • 10 years ago

    Beautifully done! For those of you wondering, this will display products with an attribute that has an “input type” of text as well, NOT JUST for those that you must select from a list (usually required for layered navigation). For example you can put value=”apple”, not just value=”24″. Very nice, absolutely exactly the type of functionality I was looking for. Thank you!

  29. Montana Flynn
    Montana Flynn  • 10 years ago

    I am developing my first Magento Site, this really opened my eyes to the true power of magento. I have definitely been doing it the hard way.

    Thanks Yoast!

    PS I would love to see more magento stuff from you!

  30. Jimmy
    Jimmy  • 10 years ago

    Wow, this extension is very similar to the one I developed, but have trouble with publishing in the community channel. Here is the info: Magento: Shop by manufacturer/brand/character/etc – Attribute Info Pages
    I am having trouble with the extension submitting process, would you be kind to help me there? (I think there’s also a possible bug in magento connect)
    Maybe we could join these two extensions… I was working on blocks, like you already have created, but I am very frustrated by this upload problem.

  31. Alan
    Alan  • 10 years ago

    Nice extension! Is is possible to filter by multiple attributes? For example, show me ‘black’ ‘GPS devices’ over ‘€100’.

    • Joachim Houtman

      No, not for the dynamic pages, yes for the static block but you will need some custom code. Open Yoast\Filter\Block\Result.php and copy the code for the first attribute and modify it to add another attribute. So you will get getAttribute2 and getValue2 etc.

      • Jack001
        Jack001  • 10 years ago

        hello Joachim,

        very nice extension! I tried to modify the result.php but nothing works. I think i did a mistake.

        _productCollection)) {
        $collection = Mage::getResourceModel('catalog/product_collection');

        if ($this->getValue()){
        $value = $this->getValue();
        } else{
        $value = $this->getRequest()->getParam('filterValue', 0);

        if ($this->getValue2()){
        $value2 = $this->getValue2();
        } else{
        $value2 = $this->getRequest()->getParam('filterValue', 0);

        if ($this->getCategory())
        $categoryId = $this->getCategory();
        $categoryId = $this->getRequest()->getParam('filterCategory', 0);

        if ($this->getAttribute()){
        $attribute = $this->getAttribute();
        } else {
        $attribute = 'color' ;

        if ($this->getAttribute2()){
        $attribute2 = $this->getAttribute2();
        } else {
        $attribute2 = 'color' ;

        $collection->addAttributeToFilter($attribute, $value);

        if ($categoryId) {
        $category = Mage::getModel('catalog/category')->load($categoryId);
        $collection->addCategoryFilter($category, true);

        $this->_productCollection = $collection;

        return $this->_productCollection;

  32. robin
    robin  • 10 years ago

    Will it work with TAGS as well?

    • Joachim Houtman

      No, it won’t. It will not be very difficult to add a tags block to a CMS page. But you had to use the tag module instead this one.

  33. VANYA
    VANYA  • 10 years ago

    Absolutely brilliant. Your works continues to amaze me and solve my problems.

    One thing I’m trying to figure out how to list a “Best Selling Products” list. Products contains different categories and descriptions.

    Any ideas?

  34. Marcel
    Marcel  • 10 years ago

    Thanks, another great magento extension from you. I’m planning to add it to the product page so I can easily display related products from te same color.

  35. Blaine Bullman
    Blaine Bullman  • 10 years ago

    I’ve just been looking for something like this thanks Joachim.

  36. Dustin Pitcher
    Dustin Pitcher  • 10 years ago

    Thanks bro! Another hugely useful post, our clients will love this!

  37. Thijs van Schadewijk
    Thijs van Schadewijk  • 10 years ago

    Great post Joachim – many thanks. This is exactly what we need for the planned 2.0 version of one of the Magento shops we’re managing: This will reduce our reliance on coding to create these kind of pages.

    I think it will also allow us to improve our Gifts page if we create a ‘gift’ attribute for each product…? Mmm have to look into that :) Again – thanks for sharing!