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
-
SnippetsHighlighting Query Text in Search Results
12 July 2011 | | | Supports v2.4
Tweet
Most search results I have seen with Silverstripe just return the Summary of the page or the FirstSentence. I have knocked up a quick way to show a sentence from the page that contains the search term and even highlights it for you.
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... -
SnippetsUsing a Password Validator
18 October 2010 | |
TweetThe Password Validator allows you to set particular criteria for your members passwords. For example if you wanted to have a minimum length of 8 characters and contain lowercase and uppercase characters, well that's a simple case of adding a couple of lines to your _config.php file!
Continue reading... -
TutorialsDynamically Generating Dropdown Lists
13 October 2010 | | | Supports v2.4, v2.3
TweetThis 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... -
SnippetsA _config.php Cheatsheet
2 July 2010 | | | Supports v2.4
Tweet
If your anything like me, you've probably found yourself going through your previous sites looking for that line of code to put in your _config.php file. Well, now you nolonger need to, simply bookmark this page and return to it any time you need to add a line to your config! And if I've missed out anything leave a comment and I'll make sure it gets added :)
Continue reading... -
SnippetsCustomise Form Actions to use the <button> tag
12 June 2010 | |
TweetBy Default, SilverStripe uses the <input type="submit"> tag for it's form actions. However, sometimes you may want to use the <button> tag to give you a little more control over styling. This snippet shows you how, as well as giving you code to achieve the same thing in UserForms!
Continue reading... -
SnippetsSet the Redirect after a successful Member Login
31 May 2010 | | | Supports v2.4, v2.3
TweetThe Member system that comes with SilverStripe offers substantial control over your site's authentication capabilities. It often requires the developer to build out or extend most common functionality to websites. This is great in that you are never "stuck" with the out-of-the-box offerings, but as any SS dev knows you end up with a little bag of Member tricks that gets used across many projects. Presented here is one that I use often.
Continue reading... -
TutorialsAdding an Email Field to the Page Comment Form
4 February 2010 | | | Supports v2.4, v2.3
TweetSilverStripes 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... -
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... -
TutorialsAdding a CMS action
1 September 2009 | | | Supports v2.4, v2.3
Tweet
If like me you cannot figure out how on earth to use the updateCMSActions() function in a decorator and you also can't get the getCMSActions() function to find your custom method inside the controller then here is a way to make it work, which will allow you to create custom actions and buttons to trigger those actions within the CMS.
Continue reading... -
TutorialsCreate a front end theme switcher
17 August 2009 | | | Supports v2.3
TweetSo you wanna make a demo site for your customers to show all your template skills in one site. A simple theme switcher can come in handy. It's quite easy to implement this.
First add two new functions to your Page_Controller class:
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... -
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... -
TutorialsCustom Login Form with Group Based Redirection
7 April 2009 | | | Supports v2.4, v2.3
TweetIn 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...