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.
When you don't specify a user, the macro will default to @creator which represents the person who created the current page, blog or space (as applicable depending on where the macro is used).
This is particularly useful when you are using the macro on a personal home page or in sidebars.
Show favourites for a specific user
Specify the user name as the default parameter, eg. to show Joe's favourite users:
{my-favourite-spaces:joe}
Show favourites for the logged in user
Specify the user as @self, for example:
{my-favourite-spaces:@self}
This is particularly useful when creating a central portal for all users (rather than individual portals) because it allows the portal to reflect the settings of the currently logged in user.
Changing logo size
To change the picture size, use the size parameter. For example, to set the logos to 24x24 pixels, use:
{my-favourite-spaces:@self|size=24}
Hiding the logos
You can hide the logos using the showImg parameter, for example:
{my-favourite-spaces:@self|showImg=false}
Outputting spaces in a list
To output users in a list, use the following syntax:
{my-favourite-spaces:output=list}
Which will result in something like this:
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.
I'm creating a menu that is working fine, I like this macro and the pages one to...
I'm creating a menu that is working fine, I like this macro and the pages one together for quick access across all spaces. But I'm trying to add some icons, earth for spaces and document for pages to the menus. So I"ve attempted wrapping each with a class, span or div tags, but I'm not getting anywhere.
I'm using this in the title panel. Do you know of a way for me to wrap them with a class so I can use my css, or do you know of another method? I'm running 3.1
I think my next attempt I'll be trying to create several macros and drop them into a widget to combine html with the favourites macros...will let you know how it goes
Comments (2)
Mar 25, 2011
marco polo says:
I'm creating a menu that is working fine, I like this macro and the pages one to...I'm creating a menu that is working fine, I like this macro and the pages one together for quick access across all spaces. But I'm trying to add some icons, earth for spaces and document for pages to the menus. So I"ve attempted wrapping each with a class, span or div tags, but I'm not getting anywhere.
I'm using this in the title panel. Do you know of a way for me to wrap them with a class so I can use my css, or do you know of another method? I'm running 3.1
{menubar} {builder-hide:user=@anonymous} {submenu}{menuicon:star_yellow_view}FAVORITES {compound-menuitem:favouritespace|caption=%Add% 'SPACE' as Favorite} {compound-menuitem:favourite|caption=%Add% 'PAGE' as Favorite} {menuseparator} {wikimenu} {span:class=favspaceslist} {my-favourite-spaces:@self|output=list|none=Your Favorite Spaces} {span} {wikimenu} {menuseparator} {wikimenu} {span:class=favpageslist} {my-favourite-pages:@self|output=list|none=Your Favorite Pages} {span} {wikimenu} {submenu} {builder-hide} {menubar}I think my next attempt I'll be trying to create several macros and drop them into a widget to combine html with the favourites macros...will let you know how it goes
Mar 26, 2011
marco polo says:
Resolved: I finally realized I was able to attach a class to the menu or submenu...Resolved:
I finally realized I was able to attach a class to the menu or submenu macro. I had previously thought it was not working.
The working code:
{menu:id=userfavz|hideanon=true}{menuicon:star_yellow_view}FAVORITES {compound-menuitem:favouritespace|class=userfavz-addspace|caption=%Add% this 'SPACE' as Favorite} {compound-menuitem:favourite|class=userfavz-addpage|caption=%Add% this 'PAGE' as Favorite} {menuseparator} {submenu:class=userfavz-spaces}{menuicon:earth}Favorite Spaces {my-favourite-spaces:@self|output=list|none=My Favorite Spaces} {submenu} {menuseparator} {wikimenu} {my-favourite-pages:@self|output=list|none=My Favorite Pages} {wikimenu} {menu}