Dashboard > Atlassian Plugins > ... > Macros > content-options
  Atlassian Plugins Log In | Sign Up   View a printable version of the current page.  
  content-options

Added by admin , last edited by David Peterson on Oct 24, 2007  (view change)
Labels: 

{content-options}

Plugin: Scaffolding Plugin

Generates a set of options linking to Confluence content (eg. pages, blog posts, etc).

Description

May be filtered in several ways. Must be contained inside a list-data macro.

Usage

{content-options:parent=[parent page]|ancestor=[ancestor page]|spaces=[space list]|branches=[all, parents, children]}

Parameters

Name Required Default Description
parent
Only immediate children of the specified page will be listed.
ancestor
Any descendent of the specified page will be listed.
spaces
Only lists pages from the specified list of spaces.
branches
Specifies the type of pages that will be listed. May be one of:
  • all - (default) All page types are returned.
  • parents - Only pages with children are listed.
  • children - Only pages with no children are listed.
labels
Specify labels which the content may contain ('xxx'), must contain ('+yyy') or may not contain ('-zzz'). Eg:
  • "foo bar": must have either 'foo' or 'bar'.
  • "+foo -bar": must have 'foo', cannot have 'bar'.

See Also

Hi,
i've two questions:

1. For what is the "scope" parameter as listed in your usage?

2. the pages, which the content-options macro lists, are not sorted in a numeric logical order.  That means after title "xxx-1" comes "xxx-10", not "xxx-2". Am I able to change the order to sort by the pages' creation date, for example?

Thanks a lot!

Robert 

1. Looking at the source code, I don't think there is a 'scope' parameter for this macro. I've updated the usage documentation.

2. That's correct - they are sorted alphabetically at present. To get more flexible sorting options in a future version, please create a feature request.

There's already a feature request SCAFF-105 which includes my request. I've voted for it 

Hi David,

i've a problem using the parent parameter. I've a page titled "ACC" in another space "Funktionen" and wanted to list the page's immediate children.

The code looks like:

 {list-data:Funktions-Auswahl|required=true}{content-options:spaces=Funktionen|parent=ACC}
{list-data}

But nothing occurs in the list to select

When I delete the option parent=ACC all pages are shown!

Cheers, Robert

Hi Robert,

I'm not aware of any specific problems with the parent parameter - I use it fairly regularly. Could you please create an issue in JIRA with the details and we'll track it down from there.

Thanks.

I have a few questions:

  1. Want to be able to list a set of SPACE-KEYs containing a specific space-label.
    How do I do that? Seems not possible using this macro, is there any other way to do it.
  2. Want to add a list of new line separated option in a page, is it possible?

Hi Appan,

1. You are correct - there is no way to generate that information at present. A new macro would have to be added ({space-options}, or something like that) which would have the filter you're after.
2. I'm not quite sure what you mean. Something like:

{list-data:New Lined}
{list-options}
One
Two
Three
{list-options}
{list-data}

If so, again, that doesn't exist at present. A new macro would do the trick.

I forgot to mention - the best place to put feature requests is to put them in JIRA. That's where we look when scheduling work for the next version.

Can I use the list-data from the content-options in a text-filter and when what is the internal data format?

I would like to build a report with the filter set to only the pages that have a given page selected in a list-data-variable. The data provided by get-data does not help to set the text-filter correctly.

Hi Björn,

I'm not 100% certain I understand your use case, but I think you can use something like this:

{report-block}

{local-reporter:content:children|location=Parent Of Pages of Interest}
  {text-sort:content:title}
  {content-filter:data:List Data Containing Page > reference:value|scope=Page Which Must Be Selected}
{local-reporter}

{report-body}
The {report-info:content:title|link=true} page has the [Page Which Must Be Selected] selected.
{report-body}

{report-block}

Hi all!

I would need following feature:

Generate a list of links to pages but do not show the page title as the link alias, but some (scaffolding) values stored in the pages.

Do you have an idea how to realize something like that?

 Thanks!

Joerg

As in, you want to display a scaffolding value stored on the selected page (as opposed to the current page)? It's kind of ugly, but you could do something like this (untested):

{hide-data}
{list-data:My Page}
  {content-options:parent=Parent Page}
{list-data}
{hide-data}
{report-link:data:My Page > reference:value > content:url}{report-info:data:My Page > reference:value > data:Scaffold Field On Target Page}{report-link}

As I said, ugly. But it should do the trick.

Great Idea, thank you very much.

Only one Problem left  I would already need the additional Information in the Selectbox.

Joerg

Not much that can be done there I'm afraid. It's hard-coded to use the page title. If you'd like to see it in a future version, the best thing is to create a feature request.

Copyright(c) CustomWare Asia Pacific Pty Ltd
Powered by Atlassian Confluence 2.7.3, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators