Jump to:

3447 Posts in 1032 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » If controls and non-ANSI field titles

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

Page: 1
Go to End
Author Topic: 1099 Views
  • Juanitou
    Avatar
    Community Member
    323 Posts

    If controls and non-ANSI field titles Link to this post

    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

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: If controls and non-ANSI field titles Link to this post

    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

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: If controls and non-ANSI field titles Link to this post

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

    Best regards,
    Juan

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: If controls and non-ANSI field titles Link to this post

    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

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: If controls and non-ANSI field titles Link to this post

    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

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: If controls and non-ANSI field titles Link to this post

    Hi!

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

    Best regards

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