You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

groovy: Security restricted macro is not allowed on this page. A page edit restriction is required that matches the macro authorization list.

import com.atlassian.confluence.pages.Page;
import bucket.container.ContainerManager;

def index = null //request.getSession(true).getServletContext().getAttribute("climb.index")

if (index == null )
{
out.println "Creating index..."
index = new Index()

String pageTitle="Climbing Guides"
Page page = ContainerManager.getComponent("pageManager").getPage(context.spaceKey,pageTitle);

addChildren(page)

request.getSession(true).getServletContext().setAttribute("climb.index", index)

}

def addChildren(Page page)
{
for (child in page.children)

Unknown macro: { doPage(child) }

}

def doPage (Page page)
{
int index1 = page.content.indexOf("

")
String xml = page.content.substring(index1, index2-index1)
out.println ("Page:" + page + " xml=" + xml )
}
addChildren(page)
}

class Index
{
List climbs = new ArrayList()
}

class Climb
{
String name
String grade
String stars
String length
String extra
String number

}

  • No labels