Hi there!
On my page I have a sign-up form. On submitting, an email is sent out to the new users.
I want to allow the editors to compose and change the text of this welcome email. Simple enough, I have a panel page, where they have a text area field that gets passed on to the email template via a data attribute.
However, as the email needs to address the new users by name, I need to include a custom kirbytag for that name, something like Dear (newuser: foo), welcome to our page!
. (foo does not have any meaning it’s just there to make the kirbytag work).
Now, when I just return a string in my kirbytag it works as expected. But I do want to include the first name of the new user in the tag. I have the firstname saved in the the data array that is sent to the email template, so in the template I could access it via $firstname
. How do I use it in the kirbytag though? Something like $tag->parent()->firstname()
does not work (and I did not really expect it to).
Any other way to make this work?
Thanks!