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.

Template Questions /

If controls and non-ANSI field titles


Reply


6 Posts   1154 Views

Avatar
Juanitou

Community Member, 323 Posts

21 March 2009 at 7:55am

Hi!

This is more an i18n wish than a bug: the limitations of the template language make that this example code will work:

<% control Fields %>
<% if Title == Email %>
<span class="email_format">$Value</span>
<% else %>
$Value
<% end_if %>
<% end_control %>

But this one, in French (note the é), will not:

<% control Fields %>
<% if Title == Mél %>
<span class="email_format">$Value</span>
<% else %>
$Value
<% end_if %>
<% end_control %>

Even not this one, with two words for the title of the field:
<% control Fields %>
<% if Title == Your Email %>
<span class="email_format">$Value</span>
<% else %>
$Value
<% end_if %>
<% end_control %>

Am I missing something? It's so difficult to implement some exact variable comparisons? I'd do it if I knew how… :/

Best regards,
Juan

Avatar
Ben Gribaudo

Community Member, 181 Posts

21 March 2009 at 9:25am

Hi Juan,

There's a proposed patch that should fix this issue: http://open.silverstripe.com/ticket/3738

Would you be interested in helping test the patch out?

Thanks,
Ben

Avatar
Juanitou

Community Member, 323 Posts

24 March 2009 at 9:36pm

Sure! I'll try it as soon as possible (maybe next week, sorry).

Best regards,
Juan

Avatar
Juanitou

Community Member, 323 Posts

2 April 2009 at 2:25am

Hi!

I really appreciate this effort, but I don't know how to quickly apply these patches, modifying the actual files by hand would be long and stupid. I'll research on this and try the patches as soon as possible.

Best regards,
Juan

Avatar
Ben Gribaudo

Community Member, 181 Posts

2 April 2009 at 4:37am

Hi Juan,

Did you download your SilverStripe install or check it out via Subversion? If you checked it out, and you're on Windows using TortoiseSVN, you already have a patch application tool installed.

Ben

Avatar
Juanitou

Community Member, 323 Posts

6 April 2009 at 8:35pm

Hi!

I have still to learn how to use SVN… Time, time!

Best regards