Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include CMS page,static blocks into Magento search

Tags:

magento-1.4

We have a magento store which mainly features the contents and it has only 12 - 15 products. So client wants cms page and static block content also to be included on search. I can search only under cms page or static block by using like and getcollection methods. But i cant be successful with combining product search/cms page search.

Please can someone help me with this

like image 480
Elamurugan Avatar asked Jun 30 '11 11:06

Elamurugan


People also ask

How do I display CMS block in Magento 2?

Use the below code snippet if you want to show CMS Static Block from template phtml file in Magento 2: echo $this->getLayout() ->createBlock('Magento\Cms\Block\Block') ->setBlockId('your_block_identifier') ->toHtml(); For another block within CMS Block in Magento 2, please use the below code to show it.

How do I get CMS block data by Identifier in Magento 2?

You can get Specific Blocks data by Identifier using Get Cms Blocks data by an identifier. You need to instantiate Magento\Cms\Api\BlockRepositoryInterface in __construct() method of Class. From Template file, You can access all the Static Block by iterate over a loop on a collection.


1 Answers

To include CMS pages in default magento search we could use the below extension

http://www.magentocommerce.com/magento-connect/tangkoko/extension/1218/tangkoko--fidesio-cms-search

I hope, it helps you.

like image 117
Sankar Subburaj Avatar answered Oct 12 '22 00:10

Sankar Subburaj