Tutorials - Big bits of code to help you do more
28 June 2009 | | | Supports v2.4, v2.3Tweet
When you have a number of pages which follow on from one another you may find that asking a user to return to an index or select the next item from a side menu each time they want to progress is cumbersome. In this situation having previous and next buttons at the bottom of a page becomes very useful. In this snippet we'll add these buttons and also a counter to show the current page we are on and the total number of pages.Continue reading...
TutorialsEmbed flash content using SWFObject
3 December 2009 | | | Supports v2.4, v2.3Tweet
There are numerous ways to embed flash content into your SilverStripe Website. A commonly used and very flexible method to embed flash is provided by the SWFObject script. In this snippet I'll show you how to create a custom FlashPage that will contain flash content, embedded using SWFObject.Continue reading...
TutorialsUsing jQuery for form validation
13 November 2009 | |Tweet
21 September 2009 | |Tweet
Something that has been bothering me when building larger sites with SilverStripe is that I often find myself creating new classes not to add functionality, but to just get a new template.
You can set separate templates for different actions manually but that's not what I want in this case, I want different templates for the same action on the same class.
After thinking about this for awhile I came up with a two part solution and the first part is to make the template choosing aware of the Sitetree hierarchy.Continue reading...
11 September 2009 | | | Supports v2.3Tweet
17 February 2010 | | | Supports v2.4, v2.3Tweet
Wouldn't it be easy to have a single environment configuration for all your SilverStripe sites without having to reconfigure each one individually? Wouldn't it be great not to have to change environment settings when you push your site from development to live servers? This is easy to achieve using the SilverStripe "ConfigureFromEnv" script.Continue reading...
TutorialsWeb 2.0 Mirrored Images
2 November 2009 | |Tweet
Ever wanted to create the so-called 'web 2.0' mirrored images as you can see on http://www.dio5.com/portfolio/, without having to manually rotate and proces the image? Then this one is for you.
I have attached a fully working zip-package, but let's run through some of the code nonetheless.Continue reading...
TutorialsWorking with banners
13 July 2009 | | | Supports v2.4, v2.3Tweet
Most of the sites I work on are for corporate/business clients and there is not typically a lot of fancy motion graphics going on. I do like to ensure there is some dynamic element going on, just to provide a bit of interest and one of the simplest ways to achieve this is by some variation of the random/rotating banners scenario. Of course this could equally apply to other parts of the page, not just banner graphics.Continue reading...
TutorialsAdding a CMS action
1 September 2009 | | | Supports v2.4, v2.3Tweet
If like me you cannot figure out how on earth to use the updateCMSActions() function in a decorator and you also can't get the getCMSActions() function to find your custom method inside the controller then here is a way to make it work, which will allow you to create custom actions and buttons to trigger those actions within the CMS.Continue reading...
6 May 2012 | | | Supports v2.4, v2.3Tweet
If you are sick of fumbling with TinyMCE but still want a way to include editable HTML styled content fields in the CMS then Markdown may be the answer.Continue reading...