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

To build the relationship between pages and parents, the page should include <core:parent> tags for each parent page within the body of the <core:page> tag.

Due to optimizations during page-only capturing, the parent pages must be added directly in the page body, not from within other nested elements.

This may not be set on the content.root of any of the books, as the parent(s) of a book varies based on where the book is placed. The parent(s) of a book are configured in the /WEB-INF/books.xml file. All books require at least one parent except the rootBook which does not allow any parent. These rules ensure a single root Directed Acyclic Graph (DAG).

If no parents are added, an automatic parent is computed as follows:

  1. If this page is the content.root of a book, include all parents configured in /WEB-INF/books.xml.
  2. If this page URL ends in /, /index.jspx or /index.jsp, look for JSP page at ../index.jspx or ../index.jsp then asssume ../, error if outside book.
  3. Look for page at ./index.jspx or ./index.jsp then assume ./.

Unless allowParentMismatch is enabled on the <core:page>, the parent must also consider this page as a child.

Tag Information

Tag Class: com.semanticcms.core.taglib.ParentTag
TagExtraInfo Class: None
Body Content: empty
Display Name: None

Attributes

Name Required Evaluation Type Description
book No Runtime String

The book containing the parent page. Defaults to the book of the current JSP file.

page Yes Runtime String

The page-relative path to the parent page.

shortTitle No Runtime String

The optional short title of the page when within the context of this parent. When not provided, the shortTitle of the page itself is used.

Variables

No Variables Defined.