July 8, 2008

[silverstripe] Sitewide sitesettings in Silverstripe

1

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.

This post is about , , , filed under silverstripe.

Comments

  1. RatsRoyago

    RatsRoyago , 4 years ago:

    Brilliant!

Post your comment

You can also tweet a reply using the following hashtag: #dio5_349

Your details and comment

Some html allowed, see code-help

Pressing ENTER 2 times makes a new paragraph. Some HTML 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.

Search