Home - Your one stop SilverStripe learning resource
- Show all
- CMS
- Security
- DataObjects
- Site Tree
- Images
- CSS
- Templates
- Forms
- Member
- Decorators
- SiteConfig
- WYSIWYG
- Errors
- Database
- JavaScript
- Comments
- Themes
- SilverStripe
- SSBits
- URLs
- Translations
- Languages
- Login
- Site of the Month
- Relations
- DataObjectManger
- Screencast
- Installing
- cPanel
- Model Admin
- Controllers
- interview
- SilverStripe 3
- Review
- Search
- Reports
-
TutorialsControllers Instead of Pages
25 January 2011 | | | Supports v2.4, v2.3
TweetSilverStripe 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... -
TutorialsRegistering Users and allowing them to edit their details
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... -
TutorialsEmbedding a contact form in a sidebar
28 October 2010 | | | Supports v2.4
TweetIn 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.4
TweetIf 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... -
TutorialsDataObjects as Pages - Part 1: Keeping it Simple
4 October 2010 | | | Supports v2.4, v2.3
Tweet
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... -
TutorialsUsing Short Codes to embed a YouTube video
28 April 2010 | | | Supports v2.4
Tweet
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... -
SnippetsAutomatically ?flush when in 'dev' mode
15 April 2010 | | | Supports v2.4, v2.3
TweetOften 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... -
SnippetsDisable Default JavaScript Behaviours
15 February 2010 | | | Supports v2.4, v2.3
TweetBy default SilverStripe uses bulky and sometimes unwanted JavaScript libraries to handle form validation and AJAX page commenting features. Often you want to disable this behaviour so you can integrate your own JavaScript code. This is easily achieved with the following two lines in you site configuration file:
Continue reading... -
SnippetsSelect a theme using a URL parameter
21 December 2009 | |
TweetWhen 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 | |
TweetOften 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.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... -
SnippetsUsing Dates in Foreign Languages
17 November 2009 | | | Supports v2.4, v2.3
TweetWith 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
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...