Parameters
- pageName - The page to list children of (optional. default = current page)
Usage:
About
Access
Actions
AddOn
Authentication
Authorization
Configuration
DeletedPages
Editor
ErrorPages
Extensions
FileTemplates
Giraffe
Quick Reference Open in a new tab
Groups
HomePage
Images
JarManager
Javascript
Journal
MessageQueue
MissingPages
PageTemplates
Processor
PublishingJournal
SQL
SiteExplorer
Spider
SystemMonitor
Temporary
Triggers
Users
renderer.sjs
//OpenForum/Extensions/ChildrenContentsPage/renderer.sjs\n";
var matching = ".*"; //Regex include all
var list = file.getAttachmentsForPage( targetPage );
var iterator= list.keySet().iterator();
var keys = [];
while(iterator.hasNext()) {
keys.push( ""+iterator.next() );
}
keys.sort();
for(var i in keys) {
var key = keys[i];
if(key.charAt(0)==='+') { // process sub pages
var addOnPageName = "" + key.substring(1);
if(addOnPageName=="history") continue;
var contentPageName = addOnPageName;
var hasQuickReference = false;
if( file.attachmentExists( targetPage + "/" + addOnPageName + "/QuickReference", "page.content" ) ) {
contentPageName = addOnPageName + "/QuickReference";
hasQuickReference = true;
}
content += "\n\n----\n\n !! [" + addOnPageName + "|" + targetPage + "/" + addOnPageName + "] \n\n";
content += " [{InsertPage page=\"" + targetPage + "/" + contentPageName + "\" section=\"1\"}]
\n"; if(hasQuickReference) { content += " [{Popup id=\"QR_"+addOnPageName+"\" sourceFileName=\"page.html.fragment\" sourcePageName=\"" + targetPage + "/" + contentPageName + "\"}]
\n"; content += " [{Popup id=\"QR_"+addOnPageName+"\" title=\"Quick Reference\"}] "; content += "__[Open in a new tab|" + targetPage + "/" + contentPageName + "]__
\n"; } } } content += "\n
";
return js.getObject("/OpenForum/Javascript/Renderer","DefaultRenderer.sjs").render(pageName,content);
\n"; if(hasQuickReference) { content += " [{Popup id=\"QR_"+addOnPageName+"\" sourceFileName=\"page.html.fragment\" sourcePageName=\"" + targetPage + "/" + contentPageName + "\"}]
\n"; content += " [{Popup id=\"QR_"+addOnPageName+"\" title=\"Quick Reference\"}] "; content += "__[Open in a new tab|" + targetPage + "/" + contentPageName + "]__
\n"; } } } content += "\n