Werner Krauss

Freelancer. Does PHP since 1998 and uses Silverstripe since 2009. Runs different customer websites and his main project, www.hallstatt.net with it.

When he's not in front of his laptop he enjoys family and playing his guitar.

Posts by Werner Krauss for Blog:

Silverstripe 3.2: clean up the CMS

As seen in this interesting talk about useful Silverstripe Modules (video) at StripeCon15 it's possible to add some extra css to LeftAndMain to style the backend experience.
Read more about 'Silverstripe 3.2: clean up the CMS'...

Retrieving some DataObjects in template without php getter

When trying to get e.g. the lastest blog posts in your template you normally create a getter for theese in php like:
Read more about 'Retrieving some DataObjects in template without php getter'...

Filter used GET parameters and pass them to the current link

Sometimes you hack something together and if a special get parameter is used something should appear different on the current page.
Read more about 'Filter used GET parameters and pass them to the current link'...

How to speed up unit tests using sqlite

Running unit tests might be dead slow if you're using mysql for it, cause for every test a new DB is set up and destroyed afterwards.
Read more about 'How to speed up unit tests using sqlite'...

Save $many_many_extraFields when adding a DataObject to a list

Assuming you have a $many_many relation and SortOrder defined as $many_many_extraFields you can add an item to this ManyManyList and pass the extraFields as an array:
Read more about 'Save $many_many_extraFields when adding a DataObject to a list'...

How to tell, if a DataObject is already written to DB

Sometimes you want to check, if you're DataObject is still a new object or already written to DB, e..g in your onBeforeWrite() method. You can either check
Read more about 'How to tell, if a DataObject is already written to DB'...

Howto send emails to more recipients

Silverstripe's Email class uses the standard php mail() function for sending emails. Sending an email to one recipient is clear, put the mail adress in the "to" parameter.
Read more about 'Howto send emails to more recipients'...

1 2 3 4