Home - Your one stop SilverStripe learning resource
- Show all
- Site Tree
- Site of the Month
- Model Admin
- SilverStripe 3
TutorialsControllers Instead of Pages
25 January 2011 | | | Supports v2.4, v2.3Tweet
SilverStripe is great for working with Pages in the CMS. But what if you need functionality without the need for content or all the "data fluff," like in Aram's tutorial about user registration and profile editing. Well, believe it or not, SilverStripe is a pretty solid MVC platform, even if you're working outside of the page data objects. It took me a while to understand how to implement true-ish MVC in SilverStripe, so I thought I'd take the opportunity to share.Continue reading...
20 December 2010 | |Tweet
These days many sites require users to register to get full functionality (SSbits included!). This is something that although not avaiable out of the box in SilverStripe is quite strait forward and a great way to gain a better understanding of both the Member and Form systems. In this tutorial we are going to create a simple registration form and a page for users to then edit their details.Continue reading...
28 October 2010 | | | Supports v2.4Tweet
In this tutorial we are going to add a form to a sidebar that can be included on any page on a website. You will be able to set whether to show the Form on a particular page via checkbox in the CMS. The work is based on the Working with SiteConfig and Creating a Simple Contact Form tutorials.Continue reading...
TutorialsPaginating a filtered DataObjectSet
25 October 2010 | | | Supports v2.4Tweet
If you have ever tried to paginate a DataObjectSet that has been customised since fetching it from the database you will have descovered that it simply doesn't work. This short tutorial provides some great code to resolve this problem and paginate to your hearts content!Continue reading...
4 October 2010 | | | Supports v2.4, v2.3Tweet
In this two part tutorial, I am going to show you how to display DataObjects as if they were pages. This is often very useful for times when you have lots of items that don't warrant full site tree objects, but do need to be displayed on their own on the site. In this first part displaying Staff Members we are going to keep it simple, using a Data Object Manager to manage our Staff Members and referring to their ID in the URL. Later in part 2, we will see how to use ModelAdmin to manage a Search Engine friendly product catalogue.Continue reading...
28 April 2010 | | | Supports v2.4Tweet
SilverStripe 2.4 has introduced shortcodes to the CMS editor. Simply, the CMS user can now add short BBCode style code to the editor area and it can then be replaced using a predefined function. For example [link id=23] could be replaced by the link to Page with an ID of 23. In fact that is exactly how internal links created in the links sidebar work in 2.4, preventing them from breaking when URLs change.Continue reading...
15 April 2010 | | | Supports v2.4, v2.3Tweet
Often when doing development work on a website - and particularly the templates - it can be a pain having to remember to add ?flush to the end of the URL to make sure all of your changes have come through. I'm sure that all of us have had that "d'oh" moment when we have spent too much time wondering why our changes weren't working, only to find a simple flush fixed it.Continue reading...
15 February 2010 | | | Supports v2.4, v2.3Tweet
21 December 2009 | |Tweet
When I develop SilverStripe sites, I usually get functionality working in the default theme blackcandy before getting it working in the final templates. This way, authors can start adding content and seeing how it looks on the page, and I can get early feedback about the functionality. Also, as a developer I get to see real content in the browser early in the process. So does the designer.Continue reading...
SnippetsUsing a Print Stylesheet
16 December 2009 | |Tweet
Often people want to be able to print webpages without all the menus and graphics and with all the content fitting correctly onto a page. To do this you need to create a separate print stylesheet. It would look something like this: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...
SnippetsUsing Dates in Foreign Languages
17 November 2009 | | | Supports v2.4, v2.3Tweet
With all the translatable, i18n and other translation related stuff in silverstripe, I think more than one is wondering how to achieve something simple as using dates in a foreign language... Actually, it's ultra easy if you add this 2 lines in your silverstripe powered website.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