Jump to:

10993 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » Calendar.ss change doesn't appear

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1289 Views
  • ITMonkey
    Avatar
    Community Member
    6 Posts

    Calendar.ss change doesn't appear Link to this post

    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.

    Many thanks.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Calendar.ss change doesn't appear Link to this post

    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:

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

    Simply override that entry in your mysite/_config.php

    global $lang;
    $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.

  • ITMonkey
    Avatar
    Community Member
    6 Posts

    Re: Calendar.ss change doesn't appear Link to this post

    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!

    Thanks again!

  • UncleCheese
    Avatar
    4085 Posts

    Re: Calendar.ss change doesn't appear Link to this post

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

    1289 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.