Tutorials - Big bits of code to help you do more
-
TutorialsLeaflet with SS3
19 November 2012 | | | Supports v3.0
Tweet
Leaflet is a good open-source alternative to Google Maps. I followed the instructions given in the Leaflet quick start guide (http://leafletjs.com/examples/quick-start.html), with a few adaptations to Silverstripe CMS. No custom icon, no additional layer, no customized css, no fancy feature : only the basic options to plot several locations on an interactive map.
Continue reading... -
TutorialsEmbed flash content using SWFObject
3 December 2009 | | | Supports v2.4, v2.3
Tweet
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
As you may have noticed, SilverStripes built in form validation is based on Prototype and is pretty limited. It also means that even though you might be using jQuery for other things on your site, you will still need to load prototype.js and all the associated files that SilverStripe requires for it's built in JavaScript form validation.
Continue reading... -
TutorialsMaking a hierarchy aware templating system
21 September 2009 | |
TweetSomething 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... -
TutorialsUsing a Thickbox Modal Window with AJAX
11 September 2009 | | | Supports v2.3
TweetThickbox is a great javascript plugin to jQuery that you can use to create modal windows within SilverStripe pages. You can de-clutter your interfaces and re-use small snippets of common functions when you add in AJAX. Before we begin there is a little homework:
Continue reading... -
TutorialsUsing SilverStripe Environment files for Database Configuration
17 February 2010 | | | Supports v2.4, v2.3
TweetWouldn'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.3
TweetMost 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.3
Tweet
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... -
TutorialsUse Markdown format with SilverStripe
6 May 2012 | | | Supports v2.4, v2.3
Tweet
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...