Download the PHP package mercator/wn-pagebuilder-skeleton-plugin without Composer

On this page you can find all versions of the php package mercator/wn-pagebuilder-skeleton-plugin. 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 wn-pagebuilder-skeleton-plugin

Mercator Page Builder

This is a WinterCMS plugin that allows you to create custom page builders for Winter's Static Pages. It has been tested with WinterCMS 1.1.3.

Installation - Composer

Configuration

Page Builder Definition

The plugin will allow you to define indvidual elements that the user can configure in the backend. On the frontend, the elements will then be rendered as defined in user-defined templates.

The available elements are defined in a single YAML file, wich is locates in components/partials/_pagebuilder.yaml. As a starting point, the YAML could look as follows:

This would provide for two elements, richtext and markdown. You can extend/replace the YAML as required.

Page Builder Element Rendering

For each element defined in the above YAML, create a partial in components/partials that renders it. For example, for richtext, create a richtext.htm, which could look as follows

You can reference the individual attributes defined in the YAML as per the above, e.g., "element.header" holds the H1.

Page Builder Interaction

There is one more file that needs attention: components/pagebuilder/default.htm:

This file renders the individual Page Builder Elements that have been defined - typically one after the other.
You will need to adapt this, e.g., enhance it with CSS and alike in line with the frontend library you are using.

Layout File

Create a layout file, the below is the most simple example. It will basically call the code you have just seen above.

Using it

Create a new Static Page. In the secondary tab wou should now see tab "Page Builder" and in there a button on the bottom reading "ADD PAGE BUILDER CPOMPONENT". Just press it - the rest should be clear.

One more thing... Site-wide settings

If your plugin requires site-wide/plugin-wide settimgs, these can be defined in the backend. You just need to add respective field defintions to models/settings/pagebuilder.yaml.

Next Steps

This is just a simple example of how this works. This Plugin is NOT production ready and the next version will over-write the YAML and the components that you have defined. Suggest not to auto update. The next version will cater for a more user-friendly version.


All versions of wn-pagebuilder-skeleton-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
composer/installers Version ~1.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 mercator/wn-pagebuilder-skeleton-plugin contains the following files

Loading the files please wait ....