Not really a Builder question this one, and quite embarassingly obvious I'm sure:
- Is there a macro I can use to print the name of the current space?
- (Related) is there a macro I can use to print the name of the current user?
TIA!
Simon
|
|||||||
Adaptavist Theme Builder Powered by Atlassian Confluence |
Comments (7)
Jan 30, 2008
Guy Fraser says:
The builder-spacetitle macro will do the trick for the first one. As for the se...The builder-spacetitle macro will do the trick for the first one.
As for the second one, if you use the menulink macro with the profile location then I think you can use the %user% token in the macro body, eg:
{menulink:profile}%user%{menulink}Our online docs for menulink macro and compound-menuitem macro were recently updated to list all the tokens and where they can be used.
Jan 03, 2008
Simon Wheatley says:
Thanks Guy. That's helped a lot, good to know about the compound-menuitem stuff....Thanks Guy. That's helped a lot, good to know about the compound-menuitem stuff.
I can't get the tokens to work. My code is as below, can you see any issues?
{compound-menuitem:activity|caption=Latest activity on %Space%|flat=true} {compound-menuitem:spaceadmin|caption=Admin %Space%|flat=true}Jan 03, 2008
Guy Fraser says:
The captions only work on specific "locations" - the one for "activity" should w...The captions only work on specific "locations" - the one for "activity" should work, but I don't think there is one for "spaceadmin". It might be worth adding a ticket to https://jira.adaptavist.com (in Builder project) to flag it for Alain's attention.
Jan 07, 2008
Alain Moran says:
if people can come up with a list of 'standard' replacements that should occur w...if people can come up with a list of 'standard' replacements that should occur with every menulink then the source code is ready and willing to undertake this
Feb 19, 2010
kicha says:
Is there a macro I can use to print the name of the current space key?Is there a macro I can use to print the name of the current space key?
Feb 19, 2010
Alain Moran says:
{builder-spacetitle} Theme Builder Plugin{builder-spacetitle}
Theme Builder PluginFeb 19, 2010
kicha says:
Thanks Alain, Theme Builder Plugin gives only the space name and not the spacek...Thanks Alain,
Theme Builder Plugin gives only the space name and not the spacekey.
I used
{menuitem}{menulink:custom|link=http://localhost:8080/display/%spacekey%/Task Management}Task Management{menulink}{menuitem}in the theme to be generic across spaces.
Is there any way to have global variables in themebuilder or confluence to store some values only to be used generically in the url links?