Variables available for phrases

Hi all --

I'm trying to update some phrases used in email notifications sent out to members for watched forums. Specifically I want the name of the forum included in the subject of the email. I found another phrase (the email footer) using "node_title" but when I tried that in the subject using the "new_thread_in_watched_forum_x", it just skipped over it and included that variable name as is: "{node_title}" (without the quotes). Am I missing something here?


Well-known member
Variables for phrases are defined when the phrase is called. You'll need to edit the email template to modify the way the phase Is called to insert a variable. If need be, you may need an add-on to fetch said information.
Ahh, perfect! Didn't know that's how that worked. Now that I'm looking at the email template it makes sense. Is there a handy guide as to the variables you can use in the email template, then? I ended up creating the node_title by using $thread.node_title - but I only used that because it's used elsewhere in the template so I just copied. (great artists steal, right?) :)


Well-known member
Variables (and information) available to templates are defined within the controllers creating the templates. If you need extra information, you'll need to extend these and insert your own variables for use by the template.
... and not even the mechanism I'm using to add node_title is working for me now. Is there a process I need to go through in order to "rebuild" the email templates in a cache or something like that?
Thanks Jeremy - that helps. However, still having some issues getting the change to the email template - which should be creating a variable at this point and passing it into the phrase function - to actually "take". My thought is that maybe I need to rebuild a cache that include email templates, since the phrase is acting like the variable is still undefined. Any thoughts here?
Hi @hqarrse - I think I did but that was before the latest upgrade which I think reset some of those settings. I haven't re-enabled on the new templates at all. The new templates actually have them towards the bottom of the email so that's okay for now, but I'd like to re-enable it when I have the time. Hasn't been a priority for me yet, though. Sorry.