Barry Swaisland

Posts by Barry Swaisland for Blog:

Diagram of relationships in SilverStripe

After reading https://docs.silverstripe.org/en/3.1/developer_guides/model/ you might need a quick reminder on the relationships between objects... here is a quick visual reminder...
Read more about 'Diagram of relationships in SilverStripe'...

Stop default pages being created

This is created based of requireDefaultRecords in SiteTree (in cms package), this indicates that this can be stopped with a yml config (in _config/config.yml)
Read more about 'Stop default pages being created'...

Access external database

If you wish to access an external database either with the ORM or with a direct DB::Query you can...
Read more about 'Access external database'...

Dates Formatted Based on Locale

$MyDate.Format(...) doesn't format based on locale, but $MyDate.FormatI18N(...) does :)
Read more about 'Dates Formatted Based on Locale'...

Changing the Name of "Settings" (aka SiteConfig)

If you wish to change the name of Settings then it cannot be done with normal methods.  Create mysite\lang\en_GB.yml and update the menu title this way...
Read more about 'Changing the Name of "Settings" (aka SiteConfig)'...

Re-ordering the CMS Menu Items

Manually changing the order of the menu items is a little time consuming with all the dev building, place this in your _config.php...
Read more about 'Re-ordering the CMS Menu Items'...

Performance

If you are looking to improve a sites performance this article is the foundation...
Read more about 'Performance'...

Remove Help Menu Item

As the menu item is created late in the process you need to extend LeftAndMain and then in onAfterInit remove the item...
Read more about 'Remove Help Menu Item'...

Can you use Facebook, Google or Twitter to login / get Member details?

Yes you can you can use any of the above for single-sign-on (SSO) and also to retrieve member information, please use the following module...
Read more about 'Can you use Facebook, Google or Twitter to login / get Member details?'...

1 2 3