I've been trying to get the Confluence 'Content by label macro' working:
http://confluence.atlassian.com/display/DOC/Content+by+Label+Macro#ContentbyLabelMacro-OptionalParameters
but I get this error message:
contentbylabel: Unable to render: class com.atlassian.confluence.spaces.SpaceDescription$$EnhancerByCGLIB$$c9a4b3cf. It is not a supported entity type.
Does this macro not work in Theme Builder? I want to generate a list to pages from labels...
thanks again, dave
.png)








Comments (6)
Aug 07, 2008
Guy Fraser says:
Most of Atlassian's macros only work on pages, blogposts and comments. I can see...Most of Atlassian's macros only work on pages, blogposts and comments. I can see from the error above that you're trying to use one of Atlassian's macros within the Space Description, however they've coded that macro in such a way that it will only work on wiki pages, news items and comments, etc.
Because Theme Builder allows you to render macros practically anywhere, eg. on the search results page, in space admin, etc., such macros can sometimes throw that error.
When you find a macro that only works on pages, etc., you can wrap it in the builder-show macro or builder-hide macro to prevent it from appearing in places where it doesn't work (use the context and mode parameters, or in recent versions you can also use action parameter, etc).
It's usually quite easy to make such macros work anywhere within Confluence so always ask the developer to remove dependence on specific CEO types. They can look at virtually any of Adaptavist's open source plugins to see how we do it and are free to copy our code from those plugins (which are released under a BSD license) even in commercial plugins/macros.
Aug 08, 2008
Dave Miller says:
Thanks Guy I'm still struggling with this - what did you mena by 'wrap it in th...Thanks Guy
I'm still struggling with this - what did you mena by 'wrap it in the builder-show macro or builder-hide macro' - can you please show an example?
I want to generate a list of hyperlinks from labels. The Confluence 'Content by label macro' does the job great, but is this possible - simply - in Themebuilder?
Aug 08, 2008
Guy Fraser says:
Something like this: {builder-show:context=page,blogpost} {contentbylabel:f...Something like this:
{builder-show:context=page,blogpost} {contentbylabel:fish} {builder-show}That will only show the contentbylabel macro when you're viewing or editing a page or news item (blogpost). You could filter it more using the mode parameter, eg. if you only want to show that stuff when viewing you could use:
{builder-show:context=page,blogpost|mode=view} {contentbylabel:fish} {builder-show}I'd also recommend putting the contentbylabel on a normal wiki page somewhere - if you use it within a theme panel it's going to be putting extra strain on the server with every page view and if your usage of the wiki grows (ie. more users, more content, etc) things will start slowing down due to gazillions of requests to contentbylabel.
Aug 08, 2008
Dave Miller says:
thanks very much Guy, I'll have a go at this davethanks very much Guy, I'll have a go at this
dave
Aug 08, 2008
Dave Miller says:
guy Is there a Themebuilder macro I can use to build a vertical list of hyperli...guy
Is there a Themebuilder macro I can use to build a vertical list of hyperlinked pages from labels? I don't have to use the confluence contentbylabel macro.
Aug 25, 2008
Dave Miller says:
anyone - any ideas on this? - a Themebuilder macro I can use to build a vertical...anyone - any ideas on this? - a Themebuilder macro I can use to build a vertical list of hyperlinked pages from labels?
thanks, dave