Download the PHP package mage-os/module-page-builder-widget without Composer

On this page you can find all versions of the php package mage-os/module-page-builder-widget. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-page-builder-widget

MageOS PageBuilder Widget Module for Magento

New page builder component named "CMS Widget".


🚀 Features

The PageBuilder Widget module allows the user to specify CMS widgets and relative configurations inside a dedicated page builder component named "CMS Widget". As for all pagebuilder components this component is draggable and can be placed inside other components.

If supported, the page builder will show widget content inside stage preview.

🔌 How it works

Widget Preview assignment

In order to create a widget preview you must create a new widget.xml file inside your module changing Magento_Widget xsd file inside "xsi:noNamespaceSchemaLocation" attribute of "widget" xml node. Literally change

with that:

Now you're able to specify new widget.xml nodes:

previewTemplates XML node

This is where all starts :) inside this node you must specify each phtml preview file and his relation to the widget frontend phtml view. So, checking widget.xml inside this module:

As you know xml files are all merged so here we need to specify the widget id and then the previewTemplates node. The Magento_Widget widget.xml specify widget's parameters and, inside of them, a "template" parameter where multiple templates are specified:

For each of these options we need to copy the value inside "previewsTemplate" child "previewTemplate" node "name" attribute and our phtml preview file inside his content. So, specifying the template inside widget configurations pagebuilder will keep the relative phtml preview.

previewCss XML node

For every preview this module allow to specify a dedicated CSS file. Inside this file you can style your previews. Keep in mind that these files are included in each widget instance preview on pagebuilder. Be sure to use enough specific css selectors avoiding conflicts with other components.

ATTENTION: Remember to place this php snippet inside your phtml preview file for css inclusion:

previewJs XML node

For every preview this module allow to specify a dedicated Js file. Inside this file you can add js actions and triggers to the preview. Remember that mouse actions are not triggered on widgets preview elements so this JS is useful for animations only (ex: sliders scroll, ... )

previewBlock XML node

Sometimes you'll need to substitute the main Block class behind the preview choosing it instead of widget model inside "class" attribute. You can specify this new PHP class in this node and it will be used replacing the original widget class:

ATTENTION: Remember to place this php snippet inside your phtml preview file for js inclusion:

previewBlockArguments XML node

As for previewBlock sometimes widget previews need to have specific methods for content retrieval and other stuff. So, instead of specifying a new previewBlock node you can add a previewBlockArguments node. Similar to view model pattern (but no need to implement ArgumentInterface there) you can specify an object that will be initialized for your preview:

Then call his public methods inside your phtml preview:

🔧 Installation

  1. Install it into your Mage-OS/Magento 2 project with composer:

  2. Enable module

🤝 Changelog

Please see CHANGELOG for more information on what has changed recently.

📄 License

The MIT License (MIT). Please see License File for more information.


All versions of module-page-builder-widget with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
magento/module-widget Version *
magento/module-page-builder Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mage-os/module-page-builder-widget contains the following files

Loading the files please wait ...