Jump to:

1842 Posts in 1600 Topics by 558 members

Blog Module

SilverStripe Forums » Blog Module » Modifying the blog templates? Localization?

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 1221 Views
  • Fairfax71
    Avatar
    Community Member
    13 Posts

    Modifying the blog templates? Localization? Link to this post

    Hi all,

    I've been bashing my head against the wall for hours trying to figure this out, reading the docs, etc., but am a total loss.

    I've been editing the file /blog/templates/Includes/BlogSummary.ss to try and make some minor modifications to how the blog entries are shown (in particular I want the summary in one div, and the full text in another). But no matter what changes I make to the file, nothing changes in the live pages. I've even done a global file search for other files containing, for example, "blogSummary" as a CSS class, but nothing turns up, so this must be the right file I'm looking for...right?

    I tried running /dev/build?flush=1 to see if that was the problem -- again, no change. Yet when I change other blog template files, I do see changes in the live site. Fluh?

    Also, I've been trying to get the localized German values to be used in the blog, but sometimes it works, sometimes it doesn't -- even on the same page. Again, I'm at a total loss.

    I tried to add this to /mysite/_config.inc.php:

    setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge', 'de-DE');
    i18n::set_locale('de_DE');

    as well as to various parts of the blog code, but nothing seems to force it to stick to German in all cases -- just in some. I did find a few spots where English text was included without using the _t() function, but even in some spots where _t() is used and German terms defined in the lang file, it uses English anyway.

    The live site is here:

    http://beta.alt-katholisch-hannover.de/aktuelles/

    Any help would be greatly appreciated. The blog is version r103774 with SilverStripe v2.4.5.

    Cheers,

    Fairfax71

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Modifying the blog templates? Localization? Link to this post

    Note you shouldn't be editing the templates inside the module. The way you want to go is to use a subtheme (http://doc.silverstripe.org/sapphire/en/topics/theme-development#subthemes). That'll make upgrading your blog later on much easier.

    But no matter what changes I make to the file, nothing changes in the live pages

    Make sure you have done a ?flush=1 as well. Also check you're editing the right site. I've been viewing the live site while changing the test site and wondering where my changes were countless times!

    You can also use ?showtemplate=1 to see what files are being included in your page.

  • tchintchie
    Avatar
    Community Member
    63 Posts

    Re: Modifying the blog templates? Localization? Link to this post

    did anyone yet find a solution to the language problem? I´m using German too

    1221 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.