Magento 2: Create Widget Programmatically & Assign Static Block to it

This article shows how you can add/create Widget using Upgrade Script of a module in Magento 2. This code is useful when you need to auto add/create widget while upgrading your custom module. Here, we will also create a CMS Static Block and assign that newly created static block to the Widget. Add Widget and … Read more

Magento 2: Add/Update CMS Static Block via Install/Upgrade Script Programmatically

This article shows how you can add or update CMS Static Block using Install or Upgrade Script of a module in Magento 2. This code is useful when you need to auto add/edit cms static block while installing or upgrading your custom module. Add CMS Static Block from InstallData Setup Script This will add cms … Read more