10987 Posts in 2724 Topics by 1817 members
|Go to End|
19 September 2009 at 1:57am
Hi, I've made a change to the wording on 'NOEVENTS' in /SilverStripe/event_calendar/templates/Layout/Calendar.ss 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.
19 September 2009 at 2:28am Last edited: 19 September 2009 2:29am
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 Calendar.ss file to its theme dir counterpart, that is /your_theme/templates/Layout/Calendar.ss, 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:
'There are no events';
Simply override that entry in your mysite/_config.php
$lang['en_US']['Calendar.ss']['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
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 Breadcrumbs.ss but CalendarEvents.ss refers to BreadCrumbs.ss (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!
19 September 2009 at 3:24am
That is an issue I'm aware of. Breadcrumbs.ss does not belong in there. Glad it's working for you!
|Go to Top|