Is there a (easy) way to add a link to the current parent page that will continue to work after pages are rearranged in the hierarchy? I'm not sure we will be able to install a plugin. If we do install a plugin, it has to be rock solid.
Example: (Read ~ as whitespace)
A (parent of B)
|
+-- B (parent of CD)
~~~|
~~~+-- C (Child of B)
~~~+-- D (Child of B)
B has a link that navigates to A
CD have links that navigate to B
Then change happens, and the tree is re-organized to look like this:
A (parent of D)
|
+-- D (parent of BC)
~~~|
~~~+-- B (Child of D)
~~~+-- C (Child of D)
Now, without having to edit the pages...
BC's link navigate to D
D's link navigates to A
Hello Brian,
You can use the Documentation theme to embed a page three macro on the left hand side of each page.
https://confluence.atlassian.com/display/DOC/Configuring+the+Documentation+Theme
This will give you a full page tree rendered on each of the pages of a space. It will include links to all descendants from the root of the space much in the matter you outline above.
Please let us know if that works for you.
I had forgotten about the docuemntation theme. While the space I'm using has the documentation theme on, it is too cluttered making it awkward to navigate. I may end up moving my pages to a new space since they are designed as a documentation collection.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Brain,
Pushing this idea a bit furhter I created the following feature request.
https://jira.atlassian.com/browse/CONF-27737
Supporting links to @<locations> may be a way to get the functionality you are looking for without the extra bulk of the documentation theme. If you think it is a good idea please give it a vote up in the upper right hand corner.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was using the solution provided by Richard for a while, but unfortunately the page information tools hasn't been updated for the newest version of Confluence (not to mention that Confluence tries to update any wiki markup whenever it gets a chance).
After searching a bit, I finally found that you can make a simple user macro that will provide the same functionality.
## @noparams #contentLink2($content.getParent() false false)
Add a user macro, choose a name and title (I used linktoparent and "Link to Parent") and leave the rest of the options at the default values. Copy and paste these two lines into the macro body field and save, and it should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works really well but is only 99% complete. I've updated this with the following code instead: ## @noparams #if (!$content.getParent()) <b>No parent page found</b> #else #contentLink2($content.getParent() false false) #end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Grierson thanks a lot, you've just saved an hour of research for a single person, thousand hours for thousands of seekers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Grierson. I concur, thank you for this. Exactly what I was looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is our solution. I will always display the name of the parent page and make it clickable. It will dynamically change no matter where you move the page to updating the parent link appropriately.
You'll need these macros:
{link-to:@parent} {page-info:title|page=@parent} {link-to}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If it can be useful:
## @param Title:title=Title|type=string|required=true|default=Go Back
## @param Style:title=Style|type=enum|required=true|enumValues=Primary,Standard|default=Primary
#set($btnClass="")
#set($txtColor="")
#if($paramStyle == "Primary")
#set($btnClass="aui-button-primary")
#set($txtColor="color:white")
#end
#if (!$content.getParent())
<b>No parent page found</b>
#else
<span>
<a class="aui-button aui-button-compact $btnClass"
style="position: absolute"
title="$content.getParent().getTitle()"
href="/pages/viewpage.action?pageId=$content.getParent().getId()"
>
<span class="aui-icon aui-icon-small aui-icon-small aui-iconfont-chevron-left-circle"></span>
<span style="$txtColor">$paramTitle</span>
</a>
</span>
#end
Preview:
Have a nice day,
-- Vincent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Reporting plugin would be one option here. It brings an "awareness" to the situation, so for instance, you could define a link on the current page which points at the parent page. This is not hard coded though, so if the page moves, then the link will point to the new parent.
{report-link:content:parent > content:url|default=_This page has no parent._}View parent page{report-link}
More info here: http://wiki.customware.net/repository/display/REPORT/report-link
I can recommend this plugin. It is a commercial one, but the license cost is reasonable in my view.
An alternative approach could be to write a user macro, as I think the Confluence objects available in Velocity (user macro language) will allow you to identify the parent of the current page, and so create suitable links.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Charles--thanks for the pointer. I like the capability of the reporting plugin. I wish we had it!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.