Render a Dynamic Page

Aspect attributes are passed to the page through the Page.renderPage() method that takes aspectAttributes.

The following code snippet passes aspect attributes to the page during rendering:

var aspectAttributes = new HashMap();
aspectAttributes.put("category", category);
res.print(PageMgr.renderPage(page.ID, aspectAttributes, ""));

The following code snippet checks to see if a page is assigned to the given category for a given aspect type and returns that page. If there is no page assigned, the code walks up the category hierarchy until it either finds a category with the page assigned or it reaches root. If no page is found even for root, it returns null.

var ignoreInvisiblePages = true;
var anAspectTypeID = "plp";

PageMgr.getPage(aCategory, ignoreInvisiblePages, anAspectTypeID);
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.