I'm editing a home page for this space and thought it might be nice to have a greeting for anyone who's visiting.
Is there a way to create a personalized greeting message at the beginning of the page? For example: Hello <person who's visiting> or something to that effect?
I looked around on Google a bit but haven't found a specific use case.
Does anyone have any suggestions?
Thanks so much.
Hi @Cathy Li
Welcome to the Atlassian Community.
Although Confluence doesn't have something out-of-the-box for that purpose, it is flexible enough for us to create it.
I know two possible ways we could achieve what you need. For both, you will need help from your Confluence administrator -- if it's not you .
In this case, you will need a Confluence administrator to enable this Macro, since it is disabled with a default installation.
There might be some security constraints on enabling it on your company. If so, check the next solution.
The code below is a simple one to get you started in case you choose this option.
In the editor, this code with the HTML macro will look like the below
Then, a user reading the page would see something like this
You may also choose to take advantage of the user macros feature in Confluence.
With this feature you can create your own macros and use it on any page, similar to the default macros shipped with Confluence or the Marketplace Apps.
This might be a preferred approach since any user in your instance may take advantage of the macro once it is configured.
You will need help from a Confluence administrator to publish this macro.
To get you started, the user macro code will be like this:
## Macro title: current-user
## Macro has a body: N
## Body processing: N
## Output: remote user name
## Developed by: <Name>
## Date created: <dd/mm/yyyy>
## Installed by: <Name>
Below is a screenshot of the full configuration for the user macro -- you may change it depending on your environment.
After the macro is published by the Confluence administrator, you can use it in your page by typing its name in the editor.
While in the editor your page would look like below, users reading it would see their name.
I hope one of these approaches helps you with what you need.
Hi @Cathy Li
Confluence may not have that information, but we may try something with Java Script.
We can take the full name as a string, split it based on spaces and show only the first part of the substring.
In my case it would be Thiago; Cathy in yours.
It's not bullet proof, but may work most of the times.
The new code should be something like this:
Let me know if that helps.
You are a genius! Thanks so much :)
On our Confluence, the names are organized as Last Name, First Name, so I changed the 0 to 1 from your code and it worked!
Thank you so so much and thank you for helping again after the initial issue is resolved :)
Have a great weekend.
Hello Confluence Community! What if i told you that you could have a healthier life and be 100% meet-less? This month, we're promoting a healthy, balanced work diet with Confluence. (Read m...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events