This is a little snipped i've been using to redirect a custom page to it's first child. It extends the init method of the Controller. This has proven useful in cases where the client wants to re-sort the child pages and doesn't want to mess around the configuration of a redirector page.

I recently ran into the problem of how to insert my own Javascript into a DOM (DataObjectManager) popup window. After much googling and getting nowhere I resorted to reading the code and discovered that it was in fact quite simple to do.

The problem I was trying to solve was for a dropdown select box to toggle fields in the form, depending on whether a link is internal or external to the site.

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.

Although Silverstripe has a mechanism for alternative configuration per environment, using the ConfigureFromEnv() method in your mysite/_config.php file, it has its limitations and I have often read people complaining about it. Here is a simple yet powerful alternative to using SilverStripe environment files.

If you have ever had to edit content on a SilverStripe site with lots of pages, you will have noticed how furstrating it is to have to keep scrolling back up the tree panel to create a page or enable drag and drop re-ordering. Well, here is a handy bit of CSS you can add to keep the tools static, even as you scroll down the tree.

As you will most likely already know, reducing the number of HTTP requests that your site makes can have a significant effect on loading times. However, usually it's not practical to combine all your files into a single one for reasons of maintainability. This is where SilverStripe steps in and provides an elegant, automated solution to this common 'requirement' (lol, get it?).

The SilverStripe ORM engine (Sapphire) makes working with your database a breeze, but that simplicity comes at a cost. Each database query contributes to slower page load times and a complicated data structure can create significant performance issues.

Here are a number of strategies that can be employed to improve your website query performance:

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!

Gravatar is a great service that allows you to pull in members profile photos directly from their Gravatar accounts. It's used right here on SSbits and it also part of the Forum module. It's also incredibly easy to integrate into your site!

We all love the DataObject Manager (DOM, not to be confused with the Document Object Model) as well as its creator UncleCheese of LeftAndMain.com. However one thing which has always frustrated me is having to look back through my code or even worse having to search the forums to find that function to set the upload folder, or create a filter for my DOM. So here within this page, lies a comprehensive list of all the things you can do with your DOM and File/ImageDOM. Viva la DOM!

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 :)

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!