Function Summary

Page ${core:capturePageInBook(String, String, String)}

Captures a <core:page> in a provided book.

Page ${core:capturePage(String, String)}

Captures a <core:page>.

Page ${core:captureContentRoot(String)}

Captures the content root <core:page> with the given capture level.

String ${core:getCaptureLevel()}

Gets the current capture level.

PageIndex ${core:getPageIndex(PageRef)}

Get the page index for the given page reference.

List<Page> ${core:convertPageDagToList(Page, String)}

Flattens a page directed acyclic graph (DAG) into a list in depth-first traversal order. Each page is only added once when first visited.

File ${core:getFileInBook(String, String, boolean)}

Gets the local file for a book and book-relative path.

File ${core:getFile(String, boolean)}

Gets the local file for a page-relative path.

File ${core:getExeFileInBook(String, String)}

Gets the local file for a book and book-relative path while making sure it is set executable.

File ${core:getExeFile(String)}

Gets the local file for a page-relative path while making sure it is set executable.

String ${core:encodeUrlParam(String)}

Encodes a value for use in a URI path component, query string, or fragment.

Encodes characters in the recommended UTF-8 encoding.

Deprecated: Please use ${ao:encodeURIComponent(value)} instead.

String ${core:getRefId(String)}

Gets an id for use in the current page.

String ${core:getRefIdInPage(Page, String)}

Gets an id for use in referencing the given page.

Double ${core:ceil(Double)}

Calls java.lang.Math.ceil(double), but returns null when argument is null.

Double ${core:floor(Double)}

Calls java.lang.Math.floor(double), but returns null when argument is null.

Map<String, String> ${core:parseQueryString(String)}

Parses the provided request query string into a Map<String,String>.

String ${core:repeat(String, int)}

Repeats a string the given number of times.

Book ${core:getBook(String)}

Gets the book for the provided page path.

String ${core:encodeHexData(String)}

Encodes arbitrary data into a UTF-8 encoded, then hex-encoded string.

boolean ${core:isExporting()}

Checks if the current request is part of a static export.

Copyright ${core:findCopyright(Page)}

Finds the copyright for the given page or null if none set.

Set<Author> ${core:findAuthors(Page)}

Finds the author(s) for the given page.

boolean ${core:findAllowRobots(Page)}

Finds the allowRobots setting for the given page.

boolean ${core:hasChild(Page)}

Checks if the given page has at least one accessible child page. Ignores child pages in missing books.

boolean ${core:hasElement(Page, String, boolean)}

Checks if the given page, or optionally any of its child pages, has at least one of the element type given.

List<?> ${core:findTopLevelElements(Node, String)}

Looks for the nearest nested elements of the given class.

List<? extends Element> ${core:filterElements(Page, String)}

Gets all elements in the page (including all child elements) that are of the given type, in the order they were declared in the page.

boolean ${core:isViewApplicable(View, Page)}

Checks if a view is applicable the given request and page.

String ${core:getViewLinkCssClass(View)}

Gets the CSS class to use for the main navigation link to this view.

Map<String, List<String>> ${core:getViewLinkParams(View, Page)}

Gets the optional additional parameter to a view link.

String ${core:getViewCopyright(View, Page)}

Gets the copyright for the given view and page.

Set<Author> ${core:getViewAuthors(View, Page)}

Gets the authors for the given view and page.

String ${core:getViewTitle(View, Page)}

Gets the title for the given view and page.

Collection<Link> ${core:getViewLinks(View, Page)}

Gets an optional set of additional links to include for this view in the order they should be added.

boolean ${core:getViewAllowRobots(View, Page)}

Gets the allowRobots for the given view and page.

String ${core:getLinkCssClass(Element)}

Gets the CSS class that is to be used to link to the given element or null if none registered.

Map<String, String> ${core:mergeGlobalAndViewScripts(View)}

Merges global and per-view scripts for the provided view.

String ${core:getShortTitle(PageRef, Page)}

Determines the short title for a page and one of its parents.