Tag: template

SS4: Replacement for good ol’ $ThemeDir: or loading themed resources

The upgrade to SS4.1 has changed how themed resources (and any other resources) need to be loaded. They will need to be loaded from the public/resources/ directory now.
Read more about 'SS4: Replacement for good ol’ $ThemeDir: or loading themed resources'...

Show filenames in templates for debugging

SilverStripe's template engine hides by default names of templates. While developing and debugging template stuff you'd like to see them in your rendered page.
Read more about 'Show filenames in templates for debugging'...

Block javascript in template

Everyone knows that Requirements::block('/path/to/javascript.js'); in php blocks this file from being loaded. This is important to e.g. require a newer version of jQuery.
Read more about 'Block javascript in template'...

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'...
RSS feed for this blog