Tutorials - Big bits of code to help you do more
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...
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...
TutorialsDataObject as Pages: The Module
24 January 2012 | |Tweet
It's been a while since we published the DataObject as Pages series of tutorials, which have proved to be particularly popular. At Aab Web we use those techniques regularly as a way to allow our clients to mange large amounts of flat content or content that is distributed in multiple places throughout a site. Although the final implementations in each project are often varied and bespoke, they all start with the basics outlined in those tutorials, so it made sense for us to build a starting point to work from (and include some more complex features at the same time). That starting point is this module, catchily entitled: DataObject as Pages.Continue reading...
TutorialsDataObjects as Pages - Part 2: Using Model Admin and URL Segments to create a product catalogue
14 November 2010 | | | Supports v2.4, v2.3Tweet
We now know the basics of using DataObjects as Pages from Part 1 of this tutorial. In part 2, we are now going to look at taking this further and creating a basic product catalogue with products that are DataObjects managed via the ModelAdmin interface. This tutorial will also serve as an introduction to ModelAdmin it self, which is an extremely powerful CRUD (Create, Read, Update, Delete) manager for any type of DataObject, whether used as pages or not.Continue reading...
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...
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...
9 April 2011 | | | Supports v2.4Tweet
I recently had a request to build a multilingual site for an accountant who wanted to enter content in English, Romanian and Russian, and wanted their site visitors to be able to switch languages by clicking on the image of the country flag - and I was pleasantly surprised to learn how quick and easy it is to implement using Silverstripe's Translatable class.Continue reading...
7 January 2011 | | | Supports v2.4, v2.3Tweet
Sometimes you'll have to create websites for clients that are very demanding when it comes to image quality, say graphic designers or photographers. SilverStripe can be a showstopper here, since images are always being re-saved when you're using something like $SetHeight in your template. This can reduce image quality quite a lot, especially when using JPEG images.Continue reading...
TutorialsWorking with Site Config
19 April 2010 | | | Supports v2.4Tweet
One of the great new features of 2.4 is the introduction of a Site Config page. This allows you to put all of those fields which are not page related, such as The sites title, root access permissions and even the current theme. The SiteConfig class is simply a dataobject and so can easily be extended to include fields, relationships and functions which you can then access from anywhere in your site.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...
24 November 2010 | | | Supports v2.4Tweet
Many people need a way to monitor their website, and while it's pretty easy to add the code to a SilverStripe template, or even the basic Page_Controller, I thought I would show how I modularized and made it accessible from the SiteConfig area of the CMS.Continue reading...
31 May 2011 | | | Supports v2.4, v2.3Tweet
The Silverstripe blog module is great and its made its way into many of my Silverstripe sites. However, for most designers it is missing one vital aspect; an image field for each post. In this tutorial I'm going to show you how to quickly add an image to the blog module without editing any of it's files, allowing hassle free upgrading in future.Continue reading...
10 May 2011 | | | Supports v2.4Tweet
For ages now I have been meaning to figure out how to get an AJAX autocomplete field working with SilverStripe Objects. So when I found this great jQuery Autocomplete Plugin, I thought now would be a good time. As always SilverStripe provides all the tools necessary to complete the task without too much hassle.Continue reading...
7 April 2009 | | | Supports v2.4, v2.3Tweet
In this tutorial we are going to create a system that allows the Admin to decide which (front-end) page a group of users are redirected to after login. This will be defined via a TreeDropdown for each group in the security section, and can also be set to send them to the admin area via a checkbox.Continue reading...
15 January 2011 | | | Supports v2.4Tweet
One way to change the MetaTags dynamicly is to add a lot of template controls to display different MetaTags for each view, but you can get a lot more flexibility by overriding the SiteTree MetaTags function in your Page_Controller.Continue reading...