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.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w change doesn't appear


4 Posts   1296 Views


19 September 2009 at 1:57am Community Member, 6 Posts

Hi, I've made a change to the wording on 'NOEVENTS' in /SilverStripe/event_calendar/templates/Layout/ and tried refreshing but the change hasn't applied. Do I need to do something different to reload an ss in a module as all changes I've made to other ss have worked, but this is the first module I've tried changing.

Many thanks.


19 September 2009 at 2:28am (Last edited: 19 September 2009 2:29am), 4085 Posts

First of all, you should not be making changes to any of the resources that come with a module. You should be doing that in your theme directory. Copy the file to its theme dir counterpart, that is /your_theme/templates/Layout/, run a /dev/build, and now SS will be using your template to override the module. SS always looks to your theme dir first for a template and the falls back on the module resource. This is to keep modules, well, modular. When updates come out, you can safely update the module as an insulated package of code.

Second, changes to language should be done in the lang file. If you look at event_calendar/lang/en_US.php (or whatever your locale), you'll see that language defined:

$lang['en_US']['']['NOEVENTS'] =
   'There are no events';

Simply override that entry in your mysite/_config.php

global $lang;
$lang['en_US']['']['NOEVENTS'] = "There ain't nothin' goin' on in the dates you selected"

If the language is all you need to change, you shouldn't have to create your own template. Just override the lang value.


19 September 2009 at 3:09am Community Member, 6 Posts

Thanks Uncle Cheese, yes I was just trying to change that bit of wording so I've updated the $lang setting.

At first I entered it into _config.php just below the global $project and global $databaseconfig settings as it seemed like a good place for it.... but then after SilverStripe disappeared completely I thought I'd move it under the current theme setting and now it's working lovely... if only I knew a little more PHP :)

By the way, I'm only playing at the moment with a temp site on a windows server (I'm having problems getting SilverStripe installed properly on my SuSE box) and I've been following the tutorials, I noticed that the tutorial tells users to set up but refers to (CAP C) - I'm afraid I've been guilty of editing the module ss again here, but I'll sort it, just thought I'd let you know!

Thanks again! :)


19 September 2009 at 3:24am 4085 Posts

That is an issue I'm aware of. does not belong in there. Glad it's working for you!