2017 © Pedro Peláez
 

silverstripe-module silverstripe-templatehelpers

Simple template functionality for Silverstripe

image

heyday/silverstripe-templatehelpers

Simple template functionality for Silverstripe

  • Friday, December 8, 2017
  • by heyday
  • Repository
  • 24 Watchers
  • 5 Stars
  • 2,363 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 16 Versions
  • 20 % Grown

The README.md

SilverStripe template helpers

A library with common functionality used by SilverStripe template developers., (*1)

Installation (with composer)

$ composer require heyday/silverstripe-templatehelpers

Usage

Once installed, the following functions are available in any .ss template:, (*2)

  • $isDev - If the site is running in a development environment
  • $isTest - If the site is running in a test environment
  • $isLive - If the site is running in a production environment
  • $ImagePath('my-image.png') - Build an image path based on config for the current environment
  • $addInlineScript('/path/in/theme/directory/file.js') - include a javascript file verbatim in the template (note that <script> tags aren't generated automatically, so you'll need to add those around this call).

$ImagePath config

The image path helper defaults to themes/[theme]/images/. The path within the theme directory can be configured in your project's YAML config:, (*3)

TemplateHelpers:
  dev_images: source/images
  prod_images: production/images

The Versions

08/12 2017

dev-master

9999999-dev

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

08/12 2017

2.0.3

2.0.3.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

22/07 2017

2.0.2

2.0.2.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

22/07 2017

2.0.1

2.0.1.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

19/07 2017

dev-ss4-upgrade

dev-ss4-upgrade

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

19/07 2017

2.0.0

2.0.0.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

28/05 2015

0.2.x-dev

0.2.9999999.9999999-dev

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

26/04 2015

1.0.3

1.0.3.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

09/05 2014

1.0.2

1.0.2.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

02/10 2013

1.0.1

1.0.1.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

22/06 2013

1.0.0

1.0.0.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

18/06 2013

0.1.x-dev

0.1.9999999.9999999-dev

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

18/06 2013

0.0.4

0.0.4.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

18/06 2013

0.0.3

0.0.3.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

18/06 2013

0.0.2

0.0.2.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires

 

17/06 2013

0.0.1

0.0.1.0

Simple template functionality for Silverstripe

  Sources   Download

The Requires