Download the PHP package eight/page-bundle without Composer

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

EightPageBundle

This bundle allows you to build cms editable pages within minutes without changing too much usual symfony development process. Supports Symfony 2+ up to 3.3 (symfony 4.0 is in roadmap). Just be sure to select the proper version.

Roadmap:

Features:

Installation

You can clone the sandbox from its repository https://github.com/matteocaberlotto/eight-cms or follow instructions below if you need to install CMS on existing project.

  1. require via composer

    • composer require eight/page-bundle
  2. install and configure dependencies (refer to each installation documentation)

    • sonata admin bundle (for admin structure/navigation)
    • raindrop routing bundle (for dynamic routing)
    • fos user bundle (this is not strictly required)
    • symfony/templating (only for some symfony versions)
    • symfony/assetic-bundle
    • you will also need to manually include twitter bootstrap assets (3.3. for 1.0. and 4. for 1.3.)
  3. add following lines to config.yml if you need to configure one or more of the following features:

    • general encoding
    • default title
    • default description
    • locales
    • homepage redirect after locale has been detected
    • default controller (you can bind custom controllers to a page, else the default will be used)
    • default layout
    • assets to be loaded in each page
    • admin assets to be appended when editing
    • metatags you want to edit in admin area
  4. Update database with

Creating pages:

To create a page you need at least 1 layout and 1 block. A layout is simply a simfony page with at least 1 call to which is the twig function that dinamically appends blocks. You can have multiple insertion points, just be sure to name each one by passing the label as parameter. EG: . Once the insertion point is present, in the admin section you can append one of the widgets defined via configuration.

An example layout could look like this:

You can use to dinamically render metatags edited in the admin section. to dinamically append stylesheet assets to the page (just read on to know how to). to dinamically append html editable blocks to the page. to dinamically append html editable blocks to all of the pages where this slot is rendered. to dinamically append javascript assets.

By default no widget is added, but you can use some defaults by simply adding this line to config.yml:

To nest widgets, call method inside a block template. Please note the 'current_block' variable as parameter which is mandatory. You can also add a label as second parameters to append multiple childrens to differents position of the current block. E.G.:

This block template allows you to append elements to both the left and right column (without mixing).

A widget is like a symfony controller with some more features: a predefined layout and an array of editable variables. Each variable has its own database slot (even if not populated). You have to use it as a symfony controller, eg:

This widget has 1 "normal" variable and 3 editable variables: the first is a variable as you would declare in a symfony controller and it will be passed with its value without references to database. Instead all others will be filled with database values: the first editable one is a simple label (255 max chars), the second is an icon you can select among all fontawesome 4.7 list and the last is a link to an entity of the specified class. More types are available. In order to create a widget you must implement all the abstract methods, a unique name to be identified and a layout. You must also register its class with the tag eight_page.widget.

To sum up, widget creation consists of 3 steps:

that's all.

Whenever you want to add the same block to multiple pages, use the method (which also accept a single string identifier as parameter). For example, you can add a static block of type "raw html" to all pages and fill with google analytics script of facebook sdk or anything that is supposed to be rendered in all pages.

In order to make jquery ui sortable feature work fine, there is one single requirement: each widget template must have a single parent html tag (usually a div or a span).

Sometimes you may need to adjust little css in administration in order to handle more complex layout editing situations. The editor adds a lot of custom classes in the admin section you can use to drive your rendering. The "preview" button will remove the editing classes from the page so you can check the page result on the fly. You can also bind your own javascript "plugins" so they will be reloaded on blocks modification, eg:

Note that everything else works the same as symfony standard so you can mix static contents with CMS ones (just note that the dinamic router of the cms has precedence in case of identical route paths).

Twig helpers:

More features:

You can also add js() or css() method to any widget to append assets dynamically. Just return an array of valid assets path.

Prefer helper in place of twig function to link to cms pages. It does exactly the same but with a little enhancement: you can also "search" for a page based on its tagging. EG: will link to a page tagged "homepage." using current locale. This helper will also link to edit mode while in admin (the link will point to the editable version of the page which is quite handy for data entry process).

Recommendations

Try to avoid adding new variables to existing widgets as this could lead to twig errors (though most are handled). A good habit could be to always add an variable to add custom classes to any block.

Sandbox

Take a look at sandbox installation at https://github.com/matteocaberlotto/eight-cms.

Demo

A working demo version with accessible admin interface is available at http://cms.eightweb.it


All versions of page-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >7.1.3
raindrop/routing-bundle Version ^5.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 eight/page-bundle contains the following files

Loading the files please wait ....