I want to fetch cms page content using Search.?
If anyone have any idea related to CMS Pages Content Search.
Can anyone help me?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this community$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$queryText = $this->queryFactory->get()->getQueryText();
$pagesCollection=$objectManager->create('Magento\Cms\Model\Page')->getCollection()
->addFieldToFilter('is_active',1)
->addFieldToFilter(
array('title','content'),
array(
array('like'=>'%'.$queryText.'%'),
array('like'=>'%'.$queryText.'%')
)
);