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

formatI18n(%B)


Go to End


2 Posts   2726 Views

Avatar
dacar

Community Member, 173 Posts

10 December 2009 at 11:59am

Edited: 10/12/2009 10:38pm

Hi,

in my Template i use the following control:

<% control getArtikel %>
$Datum.FormatI18N(%B)</div>
<% end_control %>

And get the following error: Call to a member function XML_val() on a non-object
Info from the .cache: $val .= $item->obj("ProjektDatum")->XML_val("FormatI18N",array("%B"),true) ;
EDIT: using $Created.formatI18N(%B) outside the control works fine?!

if i use

<% control getArtikel %>
$Datum</div>
<% end_control %>

there is no error an $Datum returns "2009-12-09".

in _config.php i have set: setlocale(LC_ALL, 'de_DE');

Can anybody explain, what is happening here?

Avatar
dacar

Community Member, 173 Posts

11 December 2009 at 12:30am

Now i have the same Problem with: $SiteTreeContent.Summary(50)

I have collected the data via $sqlQuery. Where is the problem? Can anybody help?

Greetings, Carsten.