• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Help with options in phrases

Jeremy

Well-known member
#2
Options aren't evaluated in phrases. You'd have to use a named variable {singular} and pass it in via the template:
{xen:phrase x, singular={yourOption}}

I'm on mobile so that syntax is probably not correct, but that's what you'll have to do.
 

Matthew Hawley

Well-known member
#3
Options aren't evaluated in phrases. You'd have to use a named variable {singular} and pass it in via the template:
{xen:phrase x, singular={yourOption}}

I'm on mobile so that syntax is probably not correct, but that's what you'll have to do.
I know its correct. So I'd have to go into each template and add {xen:phrase x, singular={yourOption}? Then can I add {singular} to the phrases?
 

Jeremy

Well-known member
#6
Yes. If you want to define a {singular} variable for the phrase. I'd verify my syntax before you do a full on replace.
 
Last edited:

Jeremy

Well-known member
#12
For one, you didn't close your opening curly brace. And no, it isn't.

This is (taken from XI blog):
HTML:
{xen:phrase xi_blog_x_added_you_as_an_author_to_blog_entry_y,
    'name={xen:helper username, $user, 'subject'}',
    'title=<a href="{xen:link 'blog-entries', $content}" class="PopupItemLink">{$content.title}</a>'}
 

Jeremy

Well-known member
#14
HTML:
{xen:phrase xi_blog_x_added_you_as_an_author_to_blog_entry_y,
    'name={xen:helper username, $user, 'subject'}',
    'title=<a href="{xen:link 'blog-entries', $content}" class="PopupItemLink">{$content.title}</a>'}
 

Matthew Hawley

Well-known member
#15
HTML:
{xen:phrase xi_blog_x_added_you_as_an_author_to_blog_entry_y,
    'name={xen:helper username, $user, 'subject'}',
    'title=<a href="{xen:link 'blog-entries', $content}" class="PopupItemLink">{$content.title}</a>'}
Could you post that as this?

Code:
{xen:phrase adds_update_to_watched_resource, noncapitalsingular={nonCapitalizedRMSingularPhrases}
 

Jeremy

Well-known member
#16
You need to surround your variables (nocapitalsingular=x) with singular quotes. And you need to close your curly braces properly.