Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Usability issue inserting links

Go to End

4 Posts   966 Views


Community Member, 176 Posts

3 March 2010 at 2:30am

This is not a real question or bug but more a usability issue I came across that I would like to see considered.

I've used Xenu link checker on a site, after one of my clients has used the SilverStripe CMS system for a couple of months. I've noticed that for external links they often forget the http:// bits. Trying this myself I have noticed the following happening when creating an external link:

1. I select Link to 'Another website'.
2. I paste the URL, but forget adding 'http://', starting with www only as my client does.
3. Inserting the link Silverstripe reverts the link to 'Page on the site' rather than 'Another website'

Wouldn't it make more sense if SilverStripe automatically adds http:// if 'Another website' is selected rather than revert to 'Page on the site'?


Community Member, 541 Posts

3 March 2010 at 5:42am

This would make a lot of sense, either that or validator checks to ensure http:// is present if someone adds an external link.



Community Member, 42 Posts

3 March 2010 at 5:00pm


It's been fixed in 2.4



Community Member, 80 Posts

3 March 2010 at 8:26pm

this can be archived by adding the following function into your page type class.

public function onBeforeWrite() {

$url = $this->ShoppingCartButtonLink;

if($url) {
if(substr($url, 0, 8) != 'https://') {
if(substr($url, 0, 7) != 'http://') {
$url = $this->ShoppingCartButtonLink = 'http://' . $url;

$this->ShoppingCartButtonLink = $url;

The 'ShoppingCartButtonLink' is one of the external link I added in one of my page.