2017 © Pedro Peláez
 

silverstripe-module widgetify

Customise page layouts by adding widgets from a CMS level

image

nzaa/widgetify

Customise page layouts by adding widgets from a CMS level

  • Monday, April 14, 2014
  • by nzaa
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,499 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 6 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Silverstripe Widgetify Module

A simple module that gives the ability to customise page layouts by adding widgets to them from a CMS level without having to create multiple page types and templates., (*1)

Maintainer

New Zealand Automobile Association, (*2)

Developer: Leandro Palmieri, (*3)

Upgraded for SS 3.1.2 by Jean-Fabien Barrois., (*4)

Requirements

Silverstripe 3.1.2+, (*5)

Installation Instructions

  1. Place the files in a directory called "widgetify" in the root of your Silverstripe installation
  2. Visit yoursite.com/dev/build?flush=all

Usage

From the CMS menu (left-hand side) click on "Widgetify" to setup templates and widgets, (*6)

Create one or more templates (the following example shows a 3 columns template), (*7)

HTML tab:, (*8)

Note: you must add tags {widget-UniqueIdentifier} where you want widgets to be placed., (*9)

<div class="col">
    {widget-1}
</div>
<div class="col">
    {widget-2}
</div>
<div class="col">
    {widget-3}
</div>

CSS tab (not required):, (*10)

col {
    float: left;
    width: 33.333%;
}

Javascript tab (not required):, (*11)

// any javascript code required for this template to function

Note: you'll probably want to have your CSS and Javascript code included directly to your own files and for that reason you will have the ability to choose whether or not to include these in the front-end when managing the page in the CMS, otherwise these are simply for CMS preview purposes., (*12)

Tip: click "Refresh and validate" before you save the template. This will check whether it is valid., (*13)

Switch to the "Widgetify Widgets" tab (top right corner in the CMS) and create your widgets. Each widget can be a static content or an include file that you can select from your site's Includes folder., (*14)

Place your includes in this folder:, (*15)

themes/yourtheme/templates/Includes

Note: it will pick up all templates within sub-folders as well., (*16)

Once you have setup your templates and widgets, you are ready to create pages., (*17)

Create a page of type "WidgetifyPage" and select a template for this page from the dropdown field., (*18)

You should now see the Widgetify layout editor and all you have to do is select your widgets from the dropdowns., (*19)

You should also have the "Dynamic content" as the first option in each dropdown. This allows you to enter a custom content for that particular position., (*20)

The Versions

14/04 2014

dev-master

9999999-dev

Customise page layouts by adding widgets from a CMS level

  Sources   Download

The Requires

 

by New Zealand Automobile Association

silverstripe widgetify