We have a page where we store all the outdated pages. We want to keep the pages around since they contain historical information. The issue is that users can find these pages using search and not easily notice that they have been moved to the archived page tree. Is there a way to change the parent page in this tree such that it would add some warning text to each child automatically? I thought maybe I could change the Page Template or Page Layout for the page and have that apply to its children, but I was unable to find any way to do that (maybe it's possible and I don't have enough permissions to do that).
Ideas?
Hello Scott,
One possibility would be to use Power Scripts for Confluence to move pages using the movePage() routine or clonePageTree().
Regards,
Hyrum
Full disclosure, I a product engineer for Power Scripts and work for Anova Apps, an Appfire company.
Hyrum,
Thanks for the reply. How would moving or cloning the pages do the job? They would still not indicate that they were out of date. The goal is to have an indication at the top of the page that the data on the page is old (without having to edit each and every page and remembering to edit any future pages). They are where we want them to be in the space.
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Scott,
Please see this example script for adding a date at the top of the page:
number id = getPage("Demo", "Example Page");
%id%.content = "<p>" + currentDate() + "\n\n" + id.content + "</p>";
Here is what the page looks like:
Here is documentation on the getPage() routine. Here is documentation on setting variables.
You may also be interested on Power Scripts' integration with Comala Workflows. Comala Workflows is really interesting in that you can create a workflow for pages (similar to a Jira issue workflow) that is useful for creating a cycle for pages and managing the process of archiving pages.
The idea here is that you could use Comala Workflows to manage the process that in turn would run a SIL script based on a workflow event.
Due to Confluence Cloud security features, you may need to open the documentation in incognito mode or by logging out of Confluence.
Regards,
Hyrum
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Scott,
You can also move through the page tree starting at the parent. something like:
number parent = getPage("Demo", "Example Page");
number [] children = getChildPages(parent);
for(number childPage in children) {
%childPage%.content = "<p>" + currentDate() + "\n\n" + childPage.content + "</p>";
}
Here is the documentation for getChildPages.
Another option is using CQL to find pages.
Regards,
Hyrum
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@scott.gartner Welcome to the Atlassian Community
If you are using the archive feature they will not show up in search https://support.atlassian.com/confluence-cloud/docs/archive-pages/ This feature is available on all paid plans.
There is no way to bulk update pages natively in Confluence other than the rest API. So really your choices are listed below to bulk edit pages or change their template.
If you are on a free plan you can always use page permissions to hide the page from other users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Brant,
Thanks for the response. The pages are not archived, but they have all been moved under one specific page (sometimes whole trees of pages were moved). The goal isn't to hide the pages, but instead to warn the user that the information is at least partially out of date.
I saw some other people talking about adding a macro to the Page Layout for the space, but the problem there is figuring out if the page is in the required part of the tree (that discussion involved changing all pages in the space, but I only want to modify some pages).
I don't know if these macros they are talking about are running on the client (JavaScript) or the server (Velocity?), or if there is a way in either of these to walk up the current page's parentage tree to see if it needs the special markup.
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a need to keep them in the same space or could they be migrated to an archive space?
If you could move them all to the same space then you could apply a macro to the page template and identify them as being archived. Otherwise, you will need to touch each page individually to add it to the page or change the page template.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Brant,
Yeah, I was trying to avoid touching all the pages, there are quite a lot of them. Plus it would be an ongoing problem as new pages are moved into that tree, someone would have to remember to apply any individual change. That's why I was looking for a generic solution at the "space" level.
If we move them to their own space, they will stop coming up in search results for this space (to which they do actually belong, they are just old/deprecated).
Also, we do have archived pages in Confluence and the archived pages do still come up in the search results in that space. Interestingly, pages that are archived all get a consistent banner on them. I wonder how that is implemented in Confluence (maybe they created a special flag, which they can use to decide when to add the "archive" banner).
Thanks for the ideas though,
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.