grgcnnr I am working on a project in Silverstripe 4. On page save/ publish I want to create a "MetaImage" which is made up of random tiles images associated with the page.

The MetaImage is created by GD - I'm then trying to save it into the ORM. Here's some example code:

public function onBeforeWrite() { $metaImage = imagecreatetruecolor(1200, 1200); //GD image created here imagejpeg($metaImage, 'assets/tmp/metaimage.jpeg');

$saveFolder =...

Shannon I want to loop my Blog Post in my Silverstripe newsletter themes I use this snippet in my Page controller:

function GetPageByType($class) { $pages = $class::get(); return $pages->count() ? $pages->first() : false; }

and these in my template:


I loop from my menumanager module and it's work but i can't looping my Pages How can i loop from my Blog & the other pages?

Shannon I'm using MAMP to install SilverStripe and had to enable php_intl in the ini. After restarting MAMP multiple times, it still gives me this error:

ERROR [Emergency]: Uncaught Exception: This backend requires the php-intl extension IN POST /silverstripe/install.php Line 31 in C:\MAMP\htdocs\silverstripe\vendor\silverstripe\framework\src\i18n\Data\Intl\IntlLocales.php

I have checked all files that I could find and were related to it, but php_intl.dll is there and it's enabled in the ini.

rogyw For Example I have this code

class MyDataObject extends DataObject { private static $has_one = [ "MyImage" => Image::class, ]; public function getCMSFields(){ $fields = parent::getCMSFields(); $fields->addFieldsToTab('Root.Main', [ UploadField::create('MyImage'); ]); return $fields; } }

When user removes file from MyDataObject in admin


Firesphere There are getVars(), postVars() and requestVars() methods in HTTPRequest. They returns parameters from GET and POST requests.

But how can I get parameters from PUT and DELETE requests?

I know that there is a 'body' property somewhere in HTTPRequest. It contains PUT params in query string or something similar. To use this property I need to parse 'body' field.

Is there a way to get these parameters with comfortable way, like for GET and POST?

dhensby I built a silverstripe website and one of my users is having an odd problem. Any time she tries to make a bulleted list it set style="font-size: 10px;".

Sometimes it's in the < li >, sometimes it's a < span style="font-size: 10px;">...< /span>, and sometimes it's both. I've watched her create a list and she's not doing anything out of the ordinary. She's using Safari on a Mac. I've tried recreating the error on Safari/Mac but I can't recreate the error. It seems like it might be specific...

dhensby I use silverstripe 4.0.3

I made and extension for a Form. This is my Extension Class:

class NewsLetterFormExtension extends DataExtension { private static $allowed_actions = [ 'NewsletterForm' ];

public function NewsletterForm() { $form = Form::create( null, Function, FieldList::create( LiteralField::create('Newsletter','NewsLetter') ->addExtraClass(''), LiteralField::create('NLContent','Erfaharen sie regelmäßig...


@dhensby had to change it totally. SS3 -> SS4 seems to be quite different beast 🙂 -> New code here:

Show 1 attachment(s)
[PHP] SilverStripe SS4 extending page -

Pastebin: [PHP] SilverStripe SS4 extending page -

Hide attachment content