Base URL in custom welcome message

AI-generated summary

sallypf wants to add a link to a user’s account page within the custom welcome message, specifically seeking a placeholder or variable to represent the base URL instead of hardcoding it. She initially tried %{base_uri} and %{base_url} without success. Moin explains that placeholders/variables only work if the code specifies their replacement values and that most texts do not offer variables beyond those used in the text itself, suggesting HTML might be necessary if allowed. JammyDodger questions the usability of {{receiver_username}} and asks for the exact site text being replaced to understand available interpolation keys. sallypf clarifies she isn’g trying to use a variable, but a placeholder for the base URL, or a placeholder for the user’s account/profile link. Moin reiterates that customizability depends on what the code offers, and includes a screenshot demonstrating available options in one particular text field. JammyDodger suspects this is for an Automation welcome message rather than the core site welcome message and suggests using an internal link: [Account](/my/preferences/account), which ultimately works for sallypf.

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.

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)

Awesome, that worked. Thanks a bunch!