Skip to end of metadata
Go to start of metadata

Description

The with-* macros allow to render a block of wiki markup in the context of another page (assuming the user has permissions to access the other page).

For instance, from the current page, you could call the {with-ancestors} macro to search for parent pages (up the page tree) matching the given criteria. The body of the {with-ancestors} macro would then be rendered, in the current page, using the page found by the macro as the context.

By default if several pages match the search parameters, then the with-* macro will use the first page found. For instance, using {with-ancestors:direction=up|label=test} will use the first ancestor page going up the page tree which is labeled 'test'. If needed the block of content can be rendered for each page found by setting searchMode=list (Builder 3.3.2)

The following with-* macros are available:

The macros include variables to refer to the resulting page's ID and title. For example, for the {with-page} macro, these are %withpageid% and %withpagetitle% respectively.

Please use the links above for specific information on each macro.

  • No labels

1 Comment

  1. Unknown User (abbriste)

    I think this is the macro I'm looking for. Here's my query.

    I want to nest a reporter in the layout that will display the last modification date, and who did the modifying for the page I'm viewing.'

    The problem I have been experiencing, is that the reporter only reports on the layout page, not the currently viewed page.

    I have wrapped my report in the with-page macro, but as it says above only reports on the page found at the top of the tree. What is the proper code to wrap my reporter in?

    {with-page}
    {report-block:maxResults=1}
    
    {content-reporter}
    
    {report-body}
    Page last modified: {report-info:content:modification date}
    by: {report-info:content:modifier|link=true}
    {report-body}
    
    {report-block}
    {with-page}