Download the PHP package cyber-duck/silverstripe-block-page without Composer

On this page you can find all versions of the php package cyber-duck/silverstripe-block-page. 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 silverstripe-block-page

SilverStripe 4 Block Page

Latest Stable Version Latest Unstable Version Total Downloads License

Author: Andrew Mc Cormack

Features

A modular approach to building pages in SilverStripe which allows model based page components.

Screen Shots

Installation

Add the following to your composer.json file and run /dev/buid?flush=all

Setup

Add Extension and Template Loop

The first step to adding block functionality is to apply the block page extension to your DataObject. This can be a normal DataObject or a Page.

This will add a new tab to the CMS called content blocks. The second step is to apply the loop within your template for the blocks:

Add Block Model and Template

The next step is to create a block. A block consists of 2 parts; a DataObject and a .ss template. Both these should have the same name.

The model file can reside anywhere inside your code folder and should extend ContentBlock The base template for a block DataObject is as follows:

In the example above 1 custom block field is created called Content. You can replace this / add any other fields you want. There are 3 config properties used for a block used in the block selection screen:

Next in your theme folder create a folder at themes/{YourTheme}/templates/Block/ and add the EditorBlock.ss template within with the following content:

Add Block YML Config

The final step to configuring your blocks is to set up the block YML config:

Visit /dev/build?flush=all

Add Blocks in the CMS

Go the the CMS and visit your Page / Object editing screen and you will see a new tab called Content Blocks. Here you can create new blocks, edit blocks, and re-order blocks.


Extra Config

Restricting Blocks

You can restrict certain block selections to a particular page type by passing a restrict option

Creating a Block Holder Template

If you wish to wrap all blocks within a certain template you can create a ContentBlock_holder.ss template within the /Block/ folder.

The loop within your page needs to change slightly and call $TemplateHolder instead of template.

Todo


All versions of silverstripe-block-page with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
silverstripe/recipe-cms Version 4.*
symbiote/silverstripe-gridfieldextensions Version 3.*
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 cyber-duck/silverstripe-block-page contains the following files

Loading the files please wait ....