Skip to main content

Magento 2 cmsCMS block names in dropdown

I want to display CMS block Namesnames (eg:footerfor example, footer links,Promotional promotional banners,. etc.)and and display modes  (eg:productsfor example, products only,static static block only,static static block and products) in the admin form dropdown.

In Magento1Magento 1, I have displayed it using the following code:

display mode: ###Display mode:

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

cms block ###CMS block

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

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

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

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.

Magento 2 CMS block names in dropdown

I want to display CMS block names (for example, footer links, promotional banners, etc.) and display modes  (for example, products only, static block only, static block and products) in the admin form dropdown.

In Magento 1, 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 the CMS block name and display modes in the admin form dropdown?

edited title
Link
Vindhuja
  • 1.4k
  • 1
  • 21
  • 43

MAgento Magento 2 cms block names in dropdown

added 36 characters in body
Source Link
Amit Bera
  • 77.7k
  • 20
  • 124
  • 239

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: 'values'=>Mage::getModel('catalog/category_attribute_source_mode')->getAllOptions() =>display mode

'values' => Mage::getModel('catalog/category_attribute_source_page')->getAllOptions() =>cms blockdisplay 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.

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: 'values'=>Mage::getModel('catalog/category_attribute_source_mode')->getAllOptions() =>display mode

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

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

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.

Source Link
Vindhuja
  • 1.4k
  • 1
  • 21
  • 43
Loading