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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

Translatable and childrenOf


Go to End


2 Posts   1693 Views

Avatar
svnee

Community Member, 1 Post

30 October 2009 at 10:57pm

Hi everybody,

I'm quite new to SS so perhaps this is obvious to you but I used monster Google and found nothing helping...

What I try to achieve is, I have a template for the Homepage where I have to show the navigation. I Currently use this code here:
http://gist.github.com/222241

But because I need to translate the website whenever I change the language SS barks at me with the following message:

[Warning] Error running : page 'Home' couldn't be found
GET /?locale=fr_FR

Line 72 in /var/www/sapphire/core/control/ContentController.php

Could anyone please help me? Atm I think that I need to use ChildrenOf because the first level Links are fixed by the template.

Sven

Avatar
Ingo

Forum Moderator, 801 Posts

2 November 2009 at 9:05am

Hm, ChildrenOf() doesnt give you any children that are not in the current locale.
Have a look at this recipe: http://doc.silverstripe.org/doku.php?id=multilingualcontent&s=translatable#templates