You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
Is there a way in Scriptrunner in Confluence I can get the the Title, URL and PAGEID of all pages in a particular space?
Thanks
Hi Mark!
You can get these values with the following script:
import com.atlassian.confluence.pages.PageManager
import com.atlassian.confluence.spaces.SpaceManager
import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.confluence.setup.settings.SettingsManager
PageManager pageManager = ComponentLocator.getComponent(PageManager)
SpaceManager spaceManager = ComponentLocator.getComponent(SpaceManager)
SettingsManager settingsManager = ComponentLocator.getComponent(SettingsManager)
def space = spaceManager.getSpace("<your_space>")
def homePage = space.getHomePage()
def listOfPages = homePage.getDescendants()
listOfPages.add(homePage)
String baseUrl = settingsManager.getGlobalSettings().getBaseUrl();
listOfPages.each {
log.warn "Page title: " + it.getTitle()
log.warn "Page Url: " + baseUrl + it.getUrlPath()
log.warn "PageID: " + it.getContentId()
}
Thanks,
Lee
Thanks, managed to get what i needed from a SQL script and lots of Excel Manipulation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
G’day everyone! Super exciting news coming from the Marketplace. We have now fully rolled out the ability for end-users to submit app requests to admins directly from within the product! No longer ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.