添加包含摘要宏,可以在页面上引入其它页面中Confluence Excerpt Macro(摘要宏)的内容。

这可以极好地保证重要信息来自单一源头。例如,您可以在概览页面上显示每个项目页面中的联系方式和日期。当摘要中的信息更新时,所有引用它的地方将自动更新。

这是需要两个步骤配合使用的宏。第一步,您需要在其它页面中添加Confluence Excerpt Macro(摘要宏),并设置摘要内容。第二步,再使用Excerpt Include宏,将摘要内容引入。

The example below shows an example of an Excerpt Include macro as it appears in the editor, and as it would appear to someone viewing the page. We have set the options to show both the title of the page and the panel surrounding the content.

下面的示例显示了一个Excerpt Include宏的示例,它出现在编辑器中,以及它在被查看时的样子。我们另外设置了显示页面标题和环绕显示内容的选项。

  1. Excerpt Include宏出现在编辑器中。
  2. 查看页面时出现的Excerpt Include宏。

内容是从名为“reusable note”的页面中的摘要宏里引入的。

在页面中添加宏

在页面中添加Excerpt Include宏:

  1. 从编辑器工具栏中,选择插入(Insert) > 其它宏(Other Macros)
  2. Confluence content类别中选择Excerpt Include
  3. Enter the title of the page containing the Excerpt macro you want to include. 
  4. 输入某个页面的标题,该页面有要被引入的摘要宏。
  5. 点击Insert。 

然后,您可以发布您的页面以查看宏的效果。 

如果页面包含多个摘要宏,则包含摘要宏将在页面上显示第一个摘要宏的内容。它无法引入同一页面上多个摘要宏的内容。

想要引入的不仅仅是摘录?Confluence 包含页面宏允许您引入另一个页面的全部内容。


修改宏参数

宏参数用于设置宏的行为。

要更改宏参数:

  1. 在编辑器中,点击宏占位符并选择“编辑(Edit)”。
  2. 根据需要设置参数,然后选择“插入(Insert)”。

这是此宏中可用的参数列表。

参数

默认值

描述

Page Containing the Excerpt
(default-parameter

none

Type the name of the page that contains the excerpt to be displayed. You can use an excerpt from a page in the same space or another space in the same wiki.

When you type the name of the page into the Excerpt Include macro dialog, Confluence will offer a list of matching pages, including those from other spaces.

Alternatively, you can type the space key followed by a colon (:) and the page name, like this:

输入要显示的摘要所在的页面名称。您可以输入同一空间中的页面或另一个空间的页面。

当您在Excerpt Include宏对话框中输入页面名称时,Confluence将提供匹配页面的列表,包括来自其它空间的页面。

或者,您可以键入空间关键字,后跟冒号(:)和页面名称,如下所示:

SPACEKEY:Page name

此参数在wiki标记中无需命名。

Remove Surrounding Panel
(nopanel)
 

false

确定Confluence是否会在摘要内容周围显示面板。面板包含摘要宏所在页面的标题和边框。默认情况下,显示面板和标题。

如果Confluence存储格式或wiki标记中使用的参数名称与浏览器中使用的参数名称不同,则会在参数名下方用括号列出,例如(example)。

其它添加方式

用键盘输入添加宏

输入左大括号{,然后输入宏名称的几个起始字符,就可以看到一个相关的宏列表。

通过wiki标记添加宏

当您想在编辑器之外添加宏时,这非常有用。例如作为侧边栏、空间页眉或页脚中的自定义内容。

Macro name: excerpt-include

Macro body: None.

{excerpt-include:My page name|nopanel=true}
CODE