Home - Your one stop SilverStripe learning resource
- Show all
- Site Tree
- Site of the Month
- Model Admin
- SilverStripe 3
TutorialsLeaflet with SS3
19 November 2012 | | | Supports v3.0Tweet
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...
12 March 2010 | | | Supports v2.4, v2.3Tweet
PHP has a very shallow learning curve, it's free and anyone can have a go at making a website by following a few tutorials and implementing their experience with other languages. However, coding for the web can be a risky business, especially with dynamic websites that take some kind of user (or external) input and use that to get data from a database.Continue reading...
21 May 2009 | | | Supports v2.4, v2.3Tweet
This snippet lets you add a thumbnail to items in UncleCheese's Data Object Manager module or a regular Complex Table field. All you need to do is create a function that returns a thumbnail and refer to this function in your DOM or CTF definition.Continue reading...
13 October 2010 | | | Supports v2.4, v2.3Tweet
This post title may look familiar, but it has in fact been completely re-written with lots of new code! When using dropdown menus, you will often want to dynamically generate the options, usually to a list of DataObjects or Pages for the user to choose from. This tutorial explores the options at your disposal when it comes to creating dynamic dropdowns in the SilverStripe.Continue reading...
24 July 2009 | | | Supports v2.4, v2.3Tweet
The default install of SilverStripe contains an array of buttons for the TinyMCE HTML editor. However usually your client will need some extra functionality or you may want to keep things simple for them by removing some of the buttons. As of SilverStripe 2.3.2 this is very easy and can be achieved by adding some code to the _config.php file.Continue reading...
3 May 2009 | | | Supports v2.4, v2.3Tweet
In this tutorial we are going to create a very simple contact form, like those commonly seen on most contact-us pages. This is a great introduction to SilverStripe forms for those new to the Subject and should also provide enough functionality for most people to use straight out of the box.Continue reading...
SnippetsAdding Gravatars to your site
8 October 2010 | | | Supports v2.4, v2.3Tweet
Gravatar is a great service that allows you to pull in members profile photos directly from their Gravatar accounts. It's used right here on SSbits and it also part of the Forum module. It's also incredibly easy to integrate into your site!Continue reading...
11 September 2011 | | | Supports v2.4, v2.3Tweet
The problem I was trying to solve was for a dropdown select box to toggle fields in the form, depending on whether a link is internal or external to the site.Continue reading...
2 August 2011 | | | Supports v2.4Tweet
Sometimes, in ModelAdmin, we want to be able to have a different default sort.
Specifically, like in cases where a has_one is the preferred sorting. For example, we have a warehouse. In our DataObjects, we have the object "Lanes", has_many Products. And we have Products, has_one "Lanes". When we're browsing our Products in the admin, we want to have them default sorted by their Lane, not their name.
Just saying default_sort = 'Lanes'; sadly does not do the job. It'll give you reddish-screens and stuff. Which is not what we like.
Here's a (quite simple actually) solution.Continue reading...
25 October 2011 | |Tweet
The Votes are in! And the winner of October's SSbits Site Of The Month is.....Continue reading...
31 October 2011 | | | Supports v2.4Tweet
There is a method on SilverStripe's Form class to set a success or error message when the form is submitted. That's cool... but sometimes you need to display a message that is not related to a form. I've created a couple of simple controller methods to enable setting and displaying of message banners anytime.Continue reading...
2 February 2012 | |Tweet
The Votes are in! And the winner of January's SSbits Site Of The Month is.....Continue reading...
1 June 2012 | |Tweet
The Votes are in! And the winner of May 2012 SSbits Site Of The Month is.....Continue reading...
27 April 2012 | |Tweet
It's been a while but SOTM if finally back. Enter your site for a chance to be in the final 5 vote off! Voting will begin on the 10th of May.Continue reading...
4 February 2010 | | | Supports v2.4, v2.3Tweet
SilverStripes comment system is great when you don't need anything more than the standard feilds, but as soon as you need some extra functionality, things get a little complicated. In this tutorial we will be adding an Email field to the comment form.Continue reading...