Download the PHP package plato-creative/sections without Composer

On this page you can find all versions of the php package plato-creative/sections. 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 sections

Sections

Installation

Composer is the recommended way of installing SilverStripe modules.

Requirements

Maintainers

Documentation

Add sections to a page

Standard section area

Add a sections area to a page type.

By default this will add a sections area that can be accessed via page templates with {$Area}

Multiple section areas

To add multiple sections to a page type.

This can be accessed in the page template with:

Limit section types by page type

Set allowed sections.

Set excluded sections.

Create new section types

Add a custom form to a section controller

Templating

File names

Sections will look for the template based on the section section name in you theme template directory. e.g. MyCustomSection will look for MyCustomSection.ss.

In addition sections will look for templates that have a specific layout appended to it. e.g. MyCustomSection_left-text.ss

Sections will also look for templates that are specific to a page type. e.g. MyCustomSection_homepage.ss

Finally sections will look for templates that match both specific layout and page type. e.g. MyCustomSection_homepage_left-text.ss

Filename hierarchy example

Taking the following conditions page classname = HomePage, section classname = MyCustomSection, section layout = left-text and extends MyParentSection we can see the templates that are searched and their priority from first to last.

Sections template variables

Sections has a few useful variables to help.

{$Class}: Returns the class defined by the section object or layout it may have.

{$ClassAttr}: Returns a class attribute with the class of the section.

{$Color}: Returns color defined by the section object.

{$Anchor}: Returns a html safe string based on the title of the current section.

{$AnchorAttr} or {$TargetAttr}: Returns a id attribute based on the title of the current section.

{$Pos} The current integer position in the area. Will start at 1.

{$Even}, {$Odd}, {$First}, {$Last} or {$Middle}: Booleans about the position in the area.

{$CurrentPage}: Access the current page scope.

Section template title

By default $Title in sections uses HTMLTag to wrap a tag with html defined in the cms. So your template can simplified to this.

Is the equivalent of

And returns


All versions of sections with dependencies

PHP Build Version
Package Version
Requires silverstripe/cms Version ^4.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 plato-creative/sections contains the following files

Loading the files please wait ....