Add pagetreesearch macro

This commit is contained in:
Manuel Rüger 2023-08-09 15:38:48 +02:00
parent 4c81bbe7f9
commit 8b72bc8e20
2 changed files with 12 additions and 1 deletions

View File

@ -456,6 +456,9 @@ By default, mark provides several built-in templates and macros:
- HideHeading: Determines whether the macro hides or displays the text 'Recently Updated' as a title above the list of content
- Labels: Filter the results by label. The macro will display only the pages etc which are tagged with the label(s) you specify here.
* template: `ac:pagetreesearch` to add a search box to your Confluence page.
- Root: Name of the root page whose hierarchy of pages will be searched by this macro. If this not specified, the root page is the current page.
* macro `@{...}` to mention user by name specified in the braces.
## Template & Macros Usecases

View File

@ -392,6 +392,14 @@ func templates(api *confluence.API) (*template.Template, error) {
`</ac:structured-macro>`,
),
/* https://confluence.atlassian.com/conf59/page-tree-search-macro-792499178.html */
`ac:pagetreesearch`: text(
`<ac:structured-macro ac:name="pagetreesearch">`,
`{{ if .Root }}<ac:parameter ac:name="root">{{ .Root }}</ac:parameter>{{ end }}`,
`</ac:structured-macro>`,
),
/* https://confluence.atlassian.com/conf59/panel-macro-792499179.html */
`ac:panel`: text(
@ -406,7 +414,7 @@ func templates(api *confluence.API) (*template.Template, error) {
`</ac:structured-macro>`,
),
/* */
/* https://confluence.atlassian.com/conf59/recently-updated-macro-792499187.html */
`ac:recently-updated`: text(
`<ac:structured-macro ac:name="recently-updated">`,
`{{ if .Spaces }}<ac:parameter ac:name="spaces"><ri:space ri:space-key={{ .Spaces }}/></ac:parameter>{{ end }}`,