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
-
SnippetsGet errors e-mailed to you
24 March 2009 | | | Supports v2.4
TweetIf your site is live it means you are probably not getting errors reported in the view, so it's handy to have them emailed to you so you can still debug and also be notified if something is up.
Add this line to your mysite/_config.php file and expect some mail!
SS_Log::add_writer(new SS_LogEmailWriter('me@mydomain.com'), SS_Log::ERR);
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... -
TutorialsAutofill MetaDescription and MetaKeywords on page save
28 July 2009 | | | Supports v2.4, v2.3
TweetMost 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... -
BlogAn Example CSS Framework
24 March 2008 | | | Supports v2.4, v2.3
Tweet
A CSS framework is a set of pre-prepared style sheets that can be used as a starting point for any project. Using a framework allows you to skip all the tedious parts of getting the basics right and lets you start working on what makes your site different from the beginning.
Continue reading... -
TutorialsSorting on a related DataObject in ModelAdmin
2 August 2011 | | | Supports v2.4
TweetSometimes, in ModelAdmin, we want to be able to have a different default sort.
Specifically, like in cases where a has_one is the preferred sorting. For example, we have a warehouse. In our DataObjects, we have the object "Lanes", has_many Products. And we have Products, has_one "Lanes". When we're browsing our Products in the admin, we want to have them default sorted by their Lane, not their name.
Just saying default_sort = 'Lanes'; sadly does not do the job. It'll give you reddish-screens and stuff. Which is not what we like.
Here's a (quite simple actually) solution.
Continue reading... -
BlogEnter now! - May 2012 Site of the Month
27 April 2012 | |
Tweet
It's been a while but SOTM if finally back. Enter your site for a chance to be in the final 5 vote off! Voting will begin on the 10th of May.
Continue reading... -
BlogDecember Site of the Month: Vote now!
14 December 2010 | |
Tweet
Here are Decembers top 5 sites for you to vote on your favourite! Vote on...
Continue reading... -
BlogMay Site of the Month - Vote now!
16 May 2012 | |
Tweet
It's that time again, vote for your favourite SilverStripe site!
Continue reading... -
BlogNovember Site of the Month: The Winner!
20 November 2010 | |
Tweet
The Votes are in! And the winner of November's SSbits Site Of The Month is.....
Continue reading... -
BlogJune Site of the Month Winner
4 July 2011 | |
Tweet
The Votes are in! And the winner of July's SSbits Site Of The Month is.....
Continue reading... -
BlogSite of the Month Winner - January 2012
2 February 2012 | |
Tweet
The Votes are in! And the winner of January's SSbits Site Of The Month is.....
Continue reading...