Confluence- Customizing Custom HTML in Look & Feel
Asked by Adhip Pokharel:

Hi,

Is it possible to customize the custom html under look \& feel so that the information is only displyed to a group called "Confluuence-Users"?

Thanks


Answers:
author: Adhip Pokharel
body: Hi Saleh,

Can the code mentioned in this article code be added in the custom html section instead? It does not let us change the layout while the theme is active. To make the theme inactive, we have to wait for off hours as most of the users in our organization have never seen confluence without Refined Wiki. We use Refined Wiki in our Confluence instance.

Thanks


author: Adhip Pokharel
body: Thanks for the information, Steve. We do have the CustomWare Visibility plugin installed in our Confluence instance. How do i use the macro on the custom html section?


author: Steve Gerstner [bridgingIT]
body: Take a look on <https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.visibility>

comments: author: Steve Gerstner [bridgingIT]
body: You can embed the visibility plugin with wikimarkup like {show-to:user=users\|group=groups\|space=spaces\|trim=true/false\|match=all/any}Any content to be shown{show-to}


author: Adhip Pokharel
body: Is this the correct syntax if i want only the users in the group "confluence-users" to see the message?

{show-to:user=users\|group=confluence-users\|space=spaces\|trim=true/false\|match=all/any}Any content to be shown{show-to}

here's our full html syntax. I edited the above syntax but it's still not working.

\<div style="background-color: #d04437; border: 0px; margin: 0px; padding: 10px 8px 8px; font-weight: bold; font-size: 14px;color: #ffffff; text-align: center;"\>  
\<marquee behavior="scroll" direction="left" scrollamount="3" \>test message \</marquee\>

<br />

{show-to:group=confluence-users\|trim=true\|match=all}Any content to be shown{show-to}  
\</div

<br />


author: Steve Gerstner [bridgingIT]
body: {show-to:group=confluence-users}Any content to be shown{show-to}  
should do it...

but in general, this will then be visible to all non anonymous users!


author: Adhip Pokharel
body: Hi Steve,

It still did not work. Below is what i have "At the end of the HEAD" in the custom HTML

\<div style="background-color: #d04437; border: 0px; margin: 0px; padding: 10px 8px 8px; font-weight: bold; font-size: 14px;color: #ffffff; text-align: center;"\>  
test message  
{show-to:group=confluence-users}Any content to be shown{show-to}  
\</div\>

This is how the message is dispalyed:

test message {show-to:group=confluence-users}Any content to be shown{show-to}

FYI: We do not allow anonymous access. So, it should not be a problem to us.


author: Adhip Pokharel
body: Hi Steve,

Just wanted to follow up with you on this.

Thanks


author: Steve Gerstner [bridgingIT]
body: Sorry,

to much traffic here....

Ok, try the following:

1. write a usermacro without parameter just returning something like "test"

2. Add the usermacro to your theme footer

3. If you can't see your string add it to the header instead, just to make sure, it's not the theme

4. If you can see your text change the macro tu use the show-to macro using the new storage format

This should work ;)


author: Adhip Pokharel
body: No worries, Steve. I totally understand. Thanks for the information. I will try it.


author: salehparsa
body: Hi Adhip,

As far as I know it's possible to ["Display Different Appearence for Different Users"](https://confluence.atlassian.com/display/CONFKB/How+to+Display+Different+Appearance+for+Different+Users+Using+Confluence+Layouts) by using Confluence layouts.

Confluence Admin \> Layouts

Take a look at the KB, You can display different content to different user groups.

Cheers,

Saleh