Core Taglib Reference

Java API for modeling web page content and relationships in a JSP environment.

Usage

Standard Syntax

<%@ taglib prefix="core" uri="https://semanticcms.com/core/taglib/" %>

XML Syntax

<anyxmlelement xmlns:core="https://semanticcms.com/core/taglib/" />

Tag Library Information

Display Name: SemanticCMS Core Taglib
Version: 1.9.1
Short Name: core
URI: https://semanticcms.com/core/taglib/

Tag Summary

<core:page>

The body of this tag represents one page of content.

<core:copyright>

Sets the copyright for the current page.

<core:author>

Adds an author to the current page. It is permissible to have an author in a missing book.

<core:parent>

Adds the given page as a parent of the current page. This tag only represents the relationship, so body content is not allowed. It is permissible to have a parent in a missing book.

<core:child>

Adds the given page as a subpage of the current page. This tag only represents the relationship, so body content is not allowed. It is permissible to have a child in a missing book.

<core:link>

Writes a link to a page and optionally an element. If element not provided, then page is required. If page is not provided, links to element within the current page.

<core:param>

Adds a parameter to its ParamsAttribute parent tag.

<core:params>

Adds multiple parameters to its ParamsAttribute parent tag.

<core:property>

Sets a property of a Node parent tag (either a Page or an Element).

See setProperty(String name, Object value).

<core:navigationTree>

Writes a tree of pages, and optionally elements, as <ul> and <li> tags.

<core:writeNodeBody>

Writes the body of the given node, recursively replacing any nested element markers. The body is not written during PAGE and META captures.

<core:doView>

Calls the view for the given page.

<core:doComponents>

Calls all registered components for the given view, page, position, and optional order.

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 ${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 URL parameter in the current response encoding.

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 ${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 ${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 ${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 ${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 ${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 ${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 ${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.