Base URL in custom welcome message

I want to add link to user’s account page in the welcome message.
I’m not able to find the base url variable. I’ve tried following but they don’t work. What is the correct base url variable?

[Account](%{base_uri}/u/{{receiver_username}}/preferences/account)
[Account](%{base_url}/u/{{receiver_username}}/preferences/account)

What is the problem you are trying to solve? Why do you need a variable instead of using the URL of your forum? Variables can only be used when the code not only provides a text from the locales file but also specifies what the variable should be replaced with. So, you cannot add variables to existing texts.

Is it the {{receiver_username}}? I’m not sure that’s a useable variable in the welcome message?

What’s the exact site text you’re replacing? It usually tells you which interpolation keys are available under the text box.

1 Like

I didn’t meant variable, I wanted placeholder/tag/text replacement/or whatever you call it, to get base url value instead of hard coding. Something like {{receiver_username}} which gives user name, do we have anything to get base url?

Alternatively do we have any such placeholder to get link for user’s account and profile pages?

As I said, only when the code specifies what it should be replaced with will it provide that. You can see all options when you edit the text. For example, in this text, you have lots of options. But that’s rare.

Most texts do not offer more variables than they use. If the text you want to customize doesn’t offer any, then you can’t use them. Also, usually you cannot use markdown syntax in texts. Instead, HTML is used. But that only works when it’s allowed for that text.

I have a feeling this is for an Automation welcome message rather than the actual site text welcome message?

I think an internal link would work for those.

[Account](/my/preferences/account)

2 Likes

Awesome, that worked. Thanks a bunch!

1 Like