Monday, August 21 in 2017
Module Frontpage Slideshow
LEPTON CMS
Pageviews 9,956
Currently online: 6
Edit this page << Other >> EmbedPDF

TemplateTester

This Droplet allows you to test different templates to any template that you have in your added-on list.
If you set perm=yes template change will be for the entire session on all screens.

Suggested Name:

TemplateTester

Droplet Code:


Parameters required:

perm=yes|no

Parameters optional:

-none-

Example Call:

[[templateTester&perm=yes]]


Note: This Droplet needs your website root index.php to be adapted.

This code needs to be added on line 36 (Website Baker v2.7.0) to make this Droplet work.

if(isset($_GET['template']) and  $_GET['template'] != '') {
    define('TEMPLATE',$_GET['template']);
    if($_GET['perm'] == 'yes') {
         $_SESSION['template'] = $_GET['template'];
    }
} else if ($_SESSION['template'] != "" and isset($_SESSION['template'])) {
    define('TEMPLATE',$_SESSION['template']);
}

 


Submitted By:

Edit this page << Other >> EmbedPDF
TagCloud