Home - Your one stop SilverStripe learning resource
- Show all
- Site Tree
- Site of the Month
- Model Admin
- SilverStripe 3
SnippetsSpice up Your CMS Sitetree
27 August 2009 | | | Supports v2.4, v2.3Tweet So you have created your own page types, but they all look the same in your CMS site tree. Time to make them more recognizable! This is quite easy, but it can make your site tree a lot more attractive. Continue reading...
26 March 2009 | | | Supports v2.4, v2.3Tweet
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...
28 July 2009 | | | Supports v2.4, v2.3Tweet
Most of my customers don't want to add meta info manually, so I add an onBeforeWrite() function to update the Meta Description field and count the keyword density of the content with a separate function and add these keywords to the Meta Keywords fields when a page is saved.
In my humble SEO opinion every page needs an unique Meta Description. Keywords seems to be less important for search engines, but why not add them automatically anyway! The function counts how many times each word exist in the Content, order the words by occurrence and glues the words to a comma separated string. In this function only words with more then 4 characters are counted, but you can adjust that if you like.Continue reading...
1 February 2011 | | | Supports v2.4, v2.3Tweet
In this tutorial we'll be taking a look at SilverStripes nested controller concept and how you can use it in your own projects. Keep in mind though that this tutorial is probably for the more advanced users and for those who whish to learn abit more about how SilverStripe works. I will be referencing Controllers Instead of Pages by Ty Barho and the nested controller we'll be building will be for handling his scenario.
I have also taken the liberty of including a zip file which contains all the code examples from Tys tutorial + the new controller and the new URL rule for it.Continue reading...
14 March 2011 | |Tweet
So here they are (finally) the best 5 entries from this month, and there are some crackers! Let the voting commense!Continue reading...
4 October 2011 | |Tweet
Enter your site for a chance to be in the final 5 vote off! Voting will begin on the 12th of October.Continue reading...
29 June 2012 | | | Supports v2.4Tweet
One of my clients wanted a clear interface from which he could easily attach downloadable files to some pages of his site. Instead of using modelAdmin and granting him an access to Silverstripe admin panel, I chose to create a front-end page showing a simple upload form, a list of the files previously uploaded to the server, and a delete button for each of them.Continue reading...
16 May 2012 | |Tweet
It's that time again, vote for your favourite SilverStripe site!
12 June 2010 | |Tweet
By 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...
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...
SnippetsCreating a Page Export Function
6 May 2009 | | | Supports v2.4, v2.3Tweet
Need to create an 'export' function for a page? Do it quickly and cleanly with HTTP::sendFileToBrowser. In your page controller, add a new action 'export':Continue reading...
20 October 2009 | |Tweet
As some of you might have noticed, as soon as you step outside of the standard SiteTree structure you're pretty much on your own. Today I had to make a menu that mixed normal SiteTree pages and controller actions.Continue reading...
SnippetsUsing a Password Validator
18 October 2010 | |Tweet
The 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...
21 October 2010 | |Tweet
The Votes are in! And the winner of October's SSbits Site Of The Month is.....Continue reading...
8 December 2010 | | | Supports v2.4Tweet
Some of you might have noticed that SilverStripe's GD class has a couple of interesting looking functions, namely rotate($angle) and greyscale($Red, $Green, $Blue). However it was never quite clear how to use these functions (at least not to me anyway!). So after a bit of trial and error, it turns out it's pretty simple to achieve by decorating the image class and adding a couple of simple functions...Continue reading...