% // Creates a list of the subpages of the current page, with their summaries, // as a definition list. Doesn't do any additional formatting. // // Parameters: // // $0 A list of pages to output instead of the subpages of the current page; // OPTIONAL. function pageSorter(a, b) { return a.title.localeCompare(b.title); } var termList; var html = ""; if ($0 && ($0 != undefined)) { termList = JSON.parse($0); } else { termList = await page.subpagesExpand(); } var numTerms = termList.length; if (numTerms) { // Alphabetize the list termList.sort(pageSorter); html += "
" + summary + "