Jul 8 2008

[Full Post] Sitewide sitesettings in Silverstripe

By Dieter Orens | 1 Reaction so far… | 0 Trackbacks

Sitesettings PreviewI have been experimenting with extending LeftAndMain in Silverstripe CMS and wrote a little module that allows for easy adaptation for settings/variables that aren't really related to pages.

Currently stuff like SiteName or Tagline are just hardcoded in the templates and I've heard quite some people asking 'where can we set this?'. While you can easily make a table for it on for example the homepage in the 'Site Content' part of the CMS, I thought it would be useful to have a different section 'Site Settings' for it, so my journey began.

There's not so much information to find about how to do this, so I based myself on what I found in existing code (CommentAdmin) and one tutorial that explains a bit about extending LeftAndMain.

The module I created has a few options in how you add extra fields, everything should be explained in the README file. If you still have questions after reading it, feel free to email me.

As I created this in trial and error, I can't promise it is bug-free, so use at own risk and let me know what goes wrong :)

Download the module here.

Comments

  1. RatsRoyago

    RatsRoyago said:

    Brilliant!

    Posted 4 months ago

Trackbacks

No trackbacks on this post.

Trackback-url for this post

http://www.dio5.com/sitewide-sitesettings-in-silverstripe/trackback

Post your comment

Code-help

Pressing ENTER 2 times makes a new paragraph. Some XHTML allowed:

  • Bold: <strong>text</strong>

  • Italic: <em>text</em>

  • Link: <a href="http://www.website.com" title="My title">My website</a>

URL's with http:// are automatically converted to links.

Get the RSSFeed for the comments on this article.