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
-
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... -
NewbiesCreating a Simple Contact Form
3 May 2009 | | | Supports v2.4, v2.3
Tweet
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... -
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... -
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... -
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... -
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... -
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... -
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... -
TutorialsCreating Previous and Next Buttons on a page
28 June 2009 | | | Supports v2.4, v2.3
TweetWhen you have a number of pages which follow on from one another you may find that asking a user to return to an index or select the next item from a side menu each time they want to progress is cumbersome. In this situation having previous and next buttons at the bottom of a page becomes very useful. In this snippet we'll add these buttons and also a counter to show the current page we are on and the total number of pages.
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... -
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... -
SnippetsClearing the Search field on click with jQuery
5 August 2009 | |
TweetAs with everything, it's attention to detail that makes great sites. One thing that really bugs me is when a site has a search box with the word 'search' inside it but which does not clear it self when clicked, meaning I have to clear it before I can search. Given it can be achieved with a few lines of jQuery, it's a real surprise how many sites fail to implement this, or that still use the 'onclick' inline javascript event.
Continue reading... -
SnippetsResizing and Manipulating Images
22 March 2009 | | | Supports v2.4, v2.3
TweetYou can resize images from within the template very easily. But sometimes you need to resize it and just use the URL value, something you can't do by calling the resize on the variable directly (e.g. $Image.CroppedImage(200,200)). This is how we would create a cropped resize of it and still be able to use just the URL, allowing a custom <img> tag.
Continue reading... -
NewbiesBuilding a SilverStripe Theme from a Static Template
26 March 2009 | | | Supports v2.4, v2.3
Tweet
In this tutorial we are going to create a SilverStripe theme from a static template. While completing this tutorial, you will build a good foundation for using the SilverStripe templating language and be able to create themes with dynamic menus and content areas.
Continue reading...