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

Phrase with parameter in templates?

Liam W

Well-known member
#1
How do you use a phrase with a parameter in templates?

Without parameter:

Code:
{xen:phrase phrase_name}
With parameter...? Is it even possible?

Liam
 
#6
Thanks a lot, it worked. I did the following:

Title: addonname_threads_list_deleted
Phrase text: This thread, started by {create_user}, has been deleted by {deleted_user}, {deleted_date}
Usage: {xen:phrase addonname_threads_list_deleted, 'create_user=User1', 'deleted_user=User2', 'deleted_date=Today'}

Is it possible to replace User1 with <xen:username user="{$threads.create}" rich="true" />?
 
#7
Thanks a lot, it worked. I did the following:

Title: addonname_threads_list_deleted
Phrase text: This thread, started by {create_user}, has been deleted by {deleted_user}, {deleted_date}
Usage: {xen:phrase addonname_threads_list_deleted, 'create_user=User1', 'deleted_user=User2', 'deleted_date=Today'}

Is it possible to replace User1 with <xen:username user="{$threads.create}" rich="true" />?
No, xen tags are not parsed within the phrase replacement variables.
 

Bob

Well-known member
#8
Thanks a lot, it worked. I did the following:

Title: addonname_threads_list_deleted
Phrase text: This thread, started by {create_user}, has been deleted by {deleted_user}, {deleted_date}
Usage: {xen:phrase addonname_threads_list_deleted, 'create_user=User1', 'deleted_user=User2', 'deleted_date=Today'}

Is it possible to replace User1 with <xen:username user="{$threads.create}" rich="true" />?
I do it like this for many phrases, not sure if that is what you are asking if you can do or not.

HTML:
{xen:phrase nflj_sportsbook_x_liked_your_event_y,
            'user={xen:helper username, $user, 'primaryText'}',
            'title=<a href="{xen:link sportsbook, $content}" >{xen:helper sportsbookPrefix, $content}{$content.title}</a>'}