silverstripe-frameworktest/code/sifr/SifrPage.php
2012-02-29 16:10:15 +01:00

24 lines
741 B
PHP

<?php
class SifrPage extends Page {
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.SifrSampleImage", new LiteralField("SifrSampleImage", '<p><img src="frameworktest/images/sifr_sample.png"/></p>'));
return $fields;
}
}
class SifrPage_Controller extends Page_Controller {
function init() {
parent::init();
Sifr::add_font('blackout', 'themes/fonts/blackout.swf');
Sifr::replace_element('blackout', 'h2', "'.sIFR-root { text-align: left; color: red;'");
Sifr::replace_element('blackout', 'h3', "'.sIFR-root { text-align: left; color: red;'");
Sifr::replace_element('blackout', 'h4', "'.sIFR-root { text-align: left; color: red;'");
Sifr::activate_sifr();
}
}