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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Blog Module /

Discuss the Blog Module.

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

[Solved] Template which loads blog entry outside blog module

Go to End

2 Posts   921 Views


Community Member, 267 Posts

2 March 2011 at 3:30am

Edited: 02/03/2011 3:32am


I got the blog module installed.
Now in my pagetree i also have this page 'viewall', this template gets all blogentry's and renders them underneath eachother with the complete story expanded. So visitors who want to view all blog entry's underneath eachother can read it like this.

This works great.

class ViewAllBlogs extends Page {
	static $db = array(
	static $has_one = array(
	static $allowed_children = array();

class ViewAllBlogs_Controller extends Page_Controller {
	function ViewAll($num=9999) {
		$news = DataObject::get_one("BlogHolder");
		return ($news) ? DataObject::get("BlogEntry", "ParentID = $news->ID", "Date DESC", "", $num) : false;


Now.. my language is set to Dutch in the config.

// Set the site locale

This works great for the blog, but on the view-all page all the blog sentences (like posted on..) are in English again. On the blog section of my site they do appear in Dutch.

How do i fix this?


	<% _t('POSTEDBY', 'Posted by') %> $Author.XML <% _t('POSTEDON', 'op') %> $Date.Long 


Community Member, 267 Posts

3 March 2011 at 11:43pm

create a language file in xoverwrite/lang
and create an empty _config.php file in the dir



global $lang;

$lang['nl_NL']['Member']['REMEMBERME'] = 'Wachtwoord onthouden?';
$lang['nl_NL']['Member']['BUTTONLOGINOTHER'] = 'Log-uit';

$lang['nl_NL']['']['POSTEDBY'] = 'Geplaatst door';
$lang['nl_NL']['']['POSTEDON'] = 'op';
$lang['nl_NL']['']['POSTEDBY'] = 'Geplaatst door';
$lang['nl_NL']['']['POSTEDON'] = 'op';
$lang['nl_NL']['']['VIEWINGTAGGED'] = 'Bekijk berichten getagd met';
$lang['nl_NL']['']['VIEWINGPOSTEDIN'] = 'Bekijk berichten geplaatst op';