I've got a lot of pages in development and page titles are changing on occasion.
Whenever I change a page name, any links to that page break.
This is because Confluence is set up to append the Page Title to the URL. I change the title, the URL breaks.
What I want is to have the system set up so all pages get a unique URL, not related to the page title.
You can use the tiny URL in the Share menu for this purpose - it's static! The tiny URL is based on the page id. This doesn't change even if the page title changes.
Clicking the Share button in the upper right on the view screen will bring up the dialogue, or you can use the s keyboard shortcut on the view page.
Cheers,
Daniel
Thanks Daniel.
That's a good start but means I have to open every single page to get the TinyUrl link.
It's quicker to right-click the item in the tree, but again, I'm asking for a URL that doesn't include the page title; a unique identifier.
Any other ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Curious on what the use case is where copying a few tiny URLs would not suffice... Confluence will keep its own internal links up to date provided you are using the [page title] style linking are not pasting raw URLs back in to Confluence.
At any rate, this is a User Macro that will print the entire page tree for a space and provide hyperlinks using page id instead of page title. The tiny URL for multiple pages doesn't seem readily available to user macros, so you'll have to excuse the extra URL length. You can right-click to get the id-based link from the output of the macro.
## @param SpaceKey:title=Space Key|type=string
#set ( $spaceToDisplay = "" )
#set ( $spaceToDisplay = $spaceManager.getSpace($paramSpaceKey) )
#if ( !$paramSpaceKey )
#set ( $spaceToDisplay = $space )
#end
#if ( $spaceToDisplay == "" )
<p> Space with key "$paramSpaceKey" not found. </p>
#else
<p> Pages in space $spaceToDisplay.key </p>
#set ( $topLevelPages = $pageManager.getTopLevelPages($spaceToDisplay) )
<div>
<ul>
#foreach ( $topLevelPage in $topLevelPages )
<li>
<a href="${req.contextPath}/pages/viewpage.action?pageId=$topLevelPage.id"> $topLevelPage.title </a>
</li>
#parseChildren($topLevelPage)
#end
</ul>
</div>
#end
#macro(parseChildren $pageToParse)
#set ( $pageChildren = $pageToParse.getChildren() )
#if ( $pageChildren != "[]" )
<ul>
#foreach($childPage in $pageChildren)
<li>
<a href="${req.contextPath}/pages/viewpage.action?pageId=$childPage.id"> $childPage.title </a>
</li>
#parseChildren($childPage)
#end
</ul>
#end
#end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
Going to have to put this down to User Education Required (AKA PEBKAC).
Straight paste of link actually does update if page title changes.
Apologies and thanks for suggestions.
L.
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.