History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: REDIR-6
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: David Peterson
Reporter: Guy Fraser
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Confluence Extension: Redirection Plugin

List aliases/redirects for a space

Created: 09/Nov/05 12:30 AM   Updated: 22/Apr/06 08:16 PM
Component/s: {alias}, {redirect}
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide
It would be nice to have a way of listing any aliases and redirects used within a space (or even the whole site?) - this would make management of these macros easier as I'm already forgetting where I've used them on the Builder User Guide, etc...

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Giles Lewis - 22/Apr/06 08:16 PM
I was able to solve this problem using the SQL macro. It is a bit of a kludge, but it works. The idea is to scan the database for any pages that contain the string "{redirect:" and then build a link to them. My solution is Oracle specific. You would probably need to tweak the SQL if using a different database. {sql:jndi=WIKI_DS|output=wiki}
select
'[' || s.spacekey || ':' || c.title || '|' ||
'http://is-wiki:11284/confluence/display/' /* hardcoded base URL */
|| s.spacekey || '/' || replace(c.title,' ','+') || '?redirect=false]'
as "Source Page"
from content c, spaces s, bodycontent b
where s.spaceid = c.spaceid
and b.contentid = c.contentid
and contenttype='PAGE'
and prevver is null
and s.spacekey='IS' /* hardcoded space key */
and instr(b.body,'{redirect:') > 0{sql}