Access Keys:
Skip to content (Access Key - 0)
Home (Access Key - 1)
All spaces... (Access Key - 3)
Log in (Access Key - 5)
Sign up (Access Key - 6)
Toggle Sidebar

show-to macro

(None)

{show-to} Macro

Examples

Hints and Tips

When showing content to specific users or groups, etc., remember that logged out users will be not be recognised (either by user name, group or space privileges).

You could create an "advanced-users" group in order to show more advanced information to users in that group.

Frequently Asked Questions

Q Rather than showing content from specific users, etc., I want to hide it from them - how?
A Use the hide-from macro.
Toggle Sidebar

See Also

Incoming Links


Outgoing Links


Added by Guy Fraser on Sep 28, 2005 01:58, last edited by Guy Fraser on Jul 21, 2008 19:11
Anonymous

In Example 3 the macro

ie and the end rather than

By the way I tried to leave this comment as a logged in user but the comment link at the end of the page is only visible when I am an anonyous user.

Tim Baker
INSIDE Contactless

Anonymous

I should have used the escape character

Here we go again

In Example 3

{show-to:space=Intranet:edit}*Please edit the relevant page in the Intranet.*{hide-from}

Should read

{show-to:space=Intranet:edit}*Please edit the relevant page in the Intranet.*{show-to}

show-to rather than hide-from at the end

Comment link to post comments only appears before sign in, when I am anonymous!!

The link to "Confluence Extensions page" in the "Availability" tab is broken (be recoverable) and should be directed to :

http://www.randombits.org/display/CONF/Visibility+Plugin#VisibilityPlugin-Downloads

Anonymous

Are there problems with nested show-tos?

As macros don't have open / close markers, the same tag is reused, then you cannot nest any macros as the following:

{div} A {div} B {div} C {div}

Doesn't know if it's output should be:

<div> A <div> B </div> C </div>

or

<div> A </div> B <div> C </div>

So it assumes the latter, meaning you cannot nest.

That's a general problem with all Confluence macros. Because there is no clear distinction between an opening and closing tag in Confluence macros, any nesting causes lots of problems.

For example, look at this HTML:

<div><div>fish</div></div>

It's obvious that you have two seperate div tags and the one that contains "fish" is inside the outer div. But look what happens when you use wiki notation:

{div}{div}fish{div}{div}

Because the start and end tags are the same, your divs aren't nested any more Whereas "fish" was inside a nested div tag in the HTML example, with wiki notation it's not even inside a single div tag in the example shown!

For some macros, plugin authors duplicate up - so for div macros we've made div2, div3, ... div9. However, for things like show-to, there aren't any aliases that can be used.

One technique we use a lot is to use show-to and hide-from macros together - it's not ideal but allows most scenarios to be accomodated.

It's our understanding that at some point Atlassian may update the rendering engine to allow closing macro tags to be more clearly defined, but that probably won't happen for at least another 6-12 months.

Anonymous

1) could not access the JIRA link above for issue tracking

2) suggest you add a feature for {show-to:anonymous} or {show-to:authenticated-users}. Currently, with LDAP or other federated authentication schemes (which don't use the default confluence group confluence-users) the trick you suggest does not allow easy hiding/showing of content based on if a user is named or anonymous.

  • show-to and hide-from 'users=' parameter now supports @anonymous and @authenticated as aliases. i.e.

see http://jira.adaptavist.com/browse/VISIB-22

Where can I find the guide on how to create user groups?

Go in to the Confluence administration console then scroll down to bottom of the navigation on the left - there should be a User Groups option there.


Adaptavist Theme Builder Powered by Atlassian Confluence