Blog, Page and Template Tools

User’s Guide

  1. User’s Guide
  2. Macros and Tools
  3. Macro: Page To Blog (Templates only)
  4. Macro: Page Restrictions (Templates only)
  5. Macro: Restricted Template (Templates only)
  6. Tool: Convert Blog to Page
  7. Tool: Convert Page to Blog

Macros and Tools

This plugin contains the following Macros and content Tools

Macro: Page To Blog (Templates only)

Purpose

This macro is designed to be used in page templates. 

When this macro is included in a page template, and content is created using the template, then the Blog, Page and Template Tools App will create a BlogPost from the content when the user clicks “Publish Blog” rather than a Page.

How To Use

Use this macro in Global or Space Page Templates. Create the Page Template as needed or add it to an existing Page Template.

You need Administration permissions to create and edit Global or Space templates. Once the template is setup as required, add the macro “Page to Blog” to the template, it is recommended to add this to the bottom of the page.

The creators of the Blog Post using this method should leave the macro on the page until after the “Publish Blog” button has been clicked. This then allows the draft, in the event that the Blog is not created, to still be used to create the Blog Post. This caqn only happen if the macro is on the page while in Draft mode or template creation mode.

Macro Setup

The macro has no parameters or a body. The presence of the macro in the template (or draft) is the trigger that is needed to create the Blog Post.

Additional Information

This macro also works with the Metadata for Confluence App. Any metadata defined by this App in the template will also be applied to the resulting Blog Post.

Macro: Page Restrictions (Templates only)

Purpose

Add this macro to any Global or Space Template and then define the standard Confluence page restrictions for the content to be created from the template.

The restrictions are created as soon as the page is created. This has the following effects:

  1. The author or page creator always is given Edit rights (this is built into Confluence).
  2. The author can modify the page restrictions before saving the page.

You need Administration permissions to create and edit Global or Space templates.

How To Use

Defining the page restrictions is performed in a similar manner to the Confluence page restriction dialog, i.e. when the lock is clicked on the page.

The 3 levels of Restrictions include:

No restrictions

To achieve this, simply remove the macro from the page.

Editing restricted

To achieve this, select ‘Editing restricted‘ from the ‘Restriction Type‘ parameter, then provide a comma separated list of Users and or Groups that have permissions to Edit the page.

In this mode, everyone else can View the content.

Use the macro parameters, ‘Users who can Edit‘ and ‘Groups that can Edit‘ to define these users.

In this Mode, the 2 parameters ‘Users who can View‘ and ‘Groups that can View‘ will be ignored.

Viewing and Editing restricted

To achieve this, select ‘Viewing and Editing restricted‘ from the ‘Restriction Type‘, then provide comma separated lists of users and or groups in any of the …..can Edit and …. can View parameters.

In this mode, Everyone has no access to the page, other than the users and groups specified.

This macro will not work if user or group names contain the ‘|’ character.

For further information on Page Restrictions, see the Confluence documentation.

Macro Setup

When using the Macro Editor, use the refresh button to evaluate the parameters and show any errors that may be present. These errors are typically that users or group names don’t exist in the system. These errors don’t stop the macro from working, but may show up spelling errors for intended users and groups.

If there are no errors, the Macro Editor Preview will provide a report of the users and groups that will be able View and or Edit the content once created.

Macro Parameters

Restriction TypeSelect either Editing restricted or Viewing and editing restricted
Users who can EditEnter a comma separated list of User names (login names). Validation of users can be performed using the Preview Button. These users will be allowed to edit and view the content once created.
Groups that can EditEnter a comma separated list of Group names. Validation of Groups can be performed using the Preview Button. All members of these groups will be allowed to edit and view the content once created.
Users who can ViewEnter a comma separated list of User names (login names). Validation of users can be performed using the Preview Button. These users will be allowed to view (only) the content once created. This parameter will be ignored when Editing restricted is selected.
Groups that can ViewEnter a comma separated list of Group names. Validation of Groups can be performed using the Preview Button. All members of these groups will be allowed to view (only) the content once created. This parameter will be ignored when Editing restricted is selected.

Macro Body

There is no body for this macro

Macro: Restricted Template (Templates only)

Purpose

Add this macro to any Global or Space Template and then define the users allowed to create content from the template.

The purpose of this macro is to restrict users from creating content from the Template, therefore viewing and editing of the template and its content is restricted. If a template has confidential or sensitive information, it can be locked down  to specific Users and Groups.

Attempted use by unauthorized users and the App will display and empty page with a warning message, before shutting down the Confluence Editor.

You need Administration permissions to create and edit Global or Space templates.

How To Use

To achieve this, provide a comma separated list of Users and or Groups in the macro parameters. Only these users and the group members will have the rights to create content.

This macro will not work if user or group names contain the ‘|’ character.

Macro Setup

When using the Macro Editor, use the refresh button to evaluate the parameters and show any errors that may be present. These errors are typically that users or group names don’t exist in the system. These errors don’t stop the macro from working, but may show up spelling errors for intended users and groups.

If there are no errors, the Macro Editor Preview will provide a report of the users and groups that will be able create content from the Template.

Macro Parameters

UsersEnter a comma separated list of User names (login names). Validation of users can be performed using the Preview Button. These users will be allowed to create content from the Template.
GroupsEnter a comma separated list of Group names. Validation of Groups can be performed using the Preview Button. All members of these groups will be allowed to create content from the Template.

Macro Body

There is no body for this macro

Tool: Convert Blog to Page

Purpose

Use this tool to convert a Blog Post to a Page with the same space. 

This tool is used to create a new Page. All the content from the Blog Post is then moved to the Page, and the original Blog Post is deleted.

Restrictions

In order to prevent any accidental conversion, the tool is restricted to the following rules. All conditions must be true for the Tool option to be visible;

  • The content must be a Blog Post.
  • A user can only convert pages if they have Edit and Delete permissions for the blog.

If these conditions are met, then the Tool option, Convert Blog to Page, will be displayed.

How to Convert

Using the Tools menu or “…”, select Convert Blog to Page. Once this is clicked, the following warning will be displayed to ensure that the user wants to perform the action.

Only once the user presses “Move” will the conversion occur.

Options

Select the parent page of the new page before converting. If not selected then the home page of the Space is chosen. Any page in the current space can be selected.

Tool: Convert Page to Blog

Purpose

Use this tool to convert a Page to a Blog Post within the same space. 

This tool is used to create a new Blog Post, dated the same day as the creation date of the Page. All the content from the Page is then moved to the Blog Post, and the original Page is deleted.

Restrictions

In order to prevent any accidental conversion, the tool is restricted to the following rules. All conditions must be true for the Tool option to be visible;

  • The content must be a Page.
  • The Space Home page can not be converted.
  • A user can only convert pages if they have Edit and Delete permissions for the page.

If these conditions are met, then the Tool option, Convert Page to Blog, will be displayed.

How to Convert

Using the Tools menu or “…”, select Convert Page to Blog. Once this is clicked, the following warning will be displayed to ensure that the user wants to perform the action.

Only once the user presses “Yes” will the conversion occur.

Options

Convert All ChildrenIf enabled, then all children pages of the current page will also be converted to Blog Posts
Include All CommentsIf enabled, then all the Comments on the page will also be moved to the Blog Post. If not, they will be deleted permanently
Keep Page RestrictionsIf enabled, then the current page restrictions will be applied to the new Blog Post