2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-requirementsinline

Provides a mechanism to inline javscript and css from external files

image

dorsetdigital/silverstripe-requirementsinline

Provides a mechanism to inline javscript and css from external files

  • Tuesday, July 3, 2018
  • by DorsetDigital
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

silverstripe-requirementsinline

Please note: This module is no longer in active development. The functionality which this module provides can now be found in the following module:, (*1)

https://github.com/DorsetDigital/silverstripe-enhanced-requirements, (*2)


Extension of SilverStripe's requirements to allow for adding scripts and CSS inline from files, (*3)

Silverstripe provides a number of ways to add Javascript and CSS to your pages, but currently doesn't allow you to add inline code from external files. This module is a simple way to do this, meaning that you can keep your inline scripts and CSS in separate files to help with your build process, but take advantage of using them inline where needed., (*4)

Scrutinizer Code Quality Build Status License Version, (*5)

Requirements

  • Silverstripe 4.x

Installation

  • Install the code with composer require dorsetdigital/silverstripe-requirementsinline
  • Run a dev/build?flush to update your project

Usage

Use the methods in the same way as the standard Requirements methods for themedCSS() and themedJavascript():, (*6)

<?php

use DorsetDigital\SilverstripeRequirements\RequirementsInline;

class MyPageController extends PageController
{

 public function init()
 {
  parent::init();
  RequirementsInline::themedJavascript('homescript');
  RequirementsInline::themedCSS('homestyles');
 }
}

The Versions

03/07 2018

dev-master

9999999-dev

Provides a mechanism to inline javscript and css from external files

  Sources   Download

BSD-3-Clause

The Requires

 

by Tim Burt - Dorset Digital Ltd

css javascript silverstripe requirements

03/07 2018

v1.0.0-beta

1.0.0.0-beta

Provides a mechanism to inline javscript and css from external files

  Sources   Download

BSD-3-Clause

The Requires

 

by Tim Burt - Dorset Digital Ltd

css javascript silverstripe requirements