Skip to main content
2 of 4
added 36 characters in body
Amit Bera
  • 77.7k
  • 20
  • 124
  • 239

MAgento 2 cms block names in dropdown

I want to display CMS block Names(eg:footer links,Promotional banners,..)and display modes(eg:products only,static block only,static block and products) in admin form dropdown.

In Magento1, I have displayed it using the following code:

display mode:

'values'=>Mage::getModel('catalog/category_attribute_source_mode')->getAllOptions() display mode

cms block

'values' => Mage::getModel('catalog/category_attribute_source_page')->getAllOptions()

What is the equivalent code for the above in Magento 2 for getting cms block name and display modes in admin form drop down.

Vindhuja
  • 1.4k
  • 1
  • 21
  • 43