Access Keys:
Skip to content (Access Key - 0)

my-favourite-spaces macro

Overview

The my-favourite-spaces macro is used to list spaces marked as favourite for a specific user.

A widget, styled using CSS, showing favourite spaces.

The default output will table of favourite spaces showing their logos, name and a link1 which can be clicked to remove them from the favourites.

Footnotes
Ref Notes
1 The link is only shown when viewing your own favourites.

The macro can be used in widgets, Theme Builder layouts and within content such as wiki pages and blog posts.

Usage

{my-favourite-spaces}

Macro Parameters

Parameter Required Default Notes Bubbles Version
default @creator The username of the person whose favourites are to be displayed:
  • username - the user's username
  • @self - the currently logged in user (does not output anything for anonymous users)
  • @creator - the user who created the current page, blog or space (as applicable depending on where the macro is being displayed)
1.0
showImg true Show logos for the listed spaces:
  • true - show pictures
  • false - do not show pictures
1.0
output table The output format for the list:
  • table - tabular format, ideal for use in Widgets
  • list - unordered list, ideal for use in Theme Builder menus
1.0
count no restriction Limit the number of spaces listed to a specific number, eg: count=5 1.0
none     The text to be displayed if there is not favourite spaces. 1.0

Tip: Make all your space logos about 48x48 pixels so they don't take up too much space.

Examples

Show favourites for the creator of the current page, space, etc.

Show favourites for a specific user

Show favourites for the logged in user

Changing logo size

Hiding the logos

Outputting spaces in a list

Hints and Tips

If you are using Theme Builder 3.0, you can embed a list of favourite spaces in to menus using syntax like the following:

{menubar}
 {menu}{compound-menuitem:home|flat=true|caption=_Home|accesskey=1}
  {compound-menuitem:favouritespace|caption=Toggle space as favourite}
  {menuseparator}
  {wikimenu}{my-favourite-spaces:@self|output=list}{wikimenu}
  {menuseparator}
  {compound-menuitem:dashboard|icon=earth_view|caption=All spaces...|accesskey=3}
 {menu}
{menubar}

In fact, that's exactly what we've done on our "Home" menu throughout this site. If you're logged in you'll see the extra options.

See Also



Ask questions, get help and report bugs & issues on our Community Site

View old comments


Adaptavist Theme Builder Powered by Atlassian Confluence