PageGenerator Methods

This topic applies to

Applies to

SuiteCommerce Web Stores

Methods on the pageGenerator object are used to generate a web store page.

The following PageGenerator methods are available:

addBreadCrumb(label, url)

Adds a bread crumb to the end of the existing bread crumb trail.

Parameters
  • label [required] {string} - text displayed for the bread crumb

  • url [required] {string} - URL to which the bread crumb links

Back toPageGenerator Methods | Back toShopping Objects

addHeadHtml(html)

Adds the specified HTML to the top of the page's <head> section, before the stylesheet HTML.

Parameters
  • html [required] {string} - HTML content

Back toPageGenerator Methods | Back toShopping Objects

addStylesheetHtml(html)

Adds the specified HTML to the top of the page's <head> section, after the stylesheet HTML

Parameters
  • html [required] {string} - HTML content

Back toPageGenerator Methods | Back toShopping Objects

addTab(id, label, url)

Adds a tab to the right of current tabs on the page.

Parameters
  • id [required] {string} - unique string id for the tab

  • label [required] {string} - label displayed within the tab

  • url [required] {string} - URL to which the tab links

Back toPageGenerator Methods | Back toShopping Objects

addToPageInitScript(scriptLines)

Adds lines of JavaScript to the page's initialization script.

Parameters
  • scriptLines [required] {string}

Back toPageGenerator Methods | Back toShopping Objects

removeBreadCrumbs()

Removes all bread crumbs from the page.

Parameters

No parameters to set.

Back toPageGenerator Methods | Back toShopping Objects

removeTab(id)

Removes a specified tab from the page.

Parameters
  • id [required] {string} - unique string id for the tab

Back toPageGenerator Methods | Back toShopping Objects

removeTabs()

Removes all tabs from the page.

Parameters

No parameters to set.

Back toPageGenerator Methods | Back toShopping Objects

setDocTypeHtml(html)

Establishes HTML for the page <doctype> tag.

Parameters
  • html [required] {string} - HTML content

Back toPageGenerator Methods | Back toShopping Objects

setMetaTagHtml(html)

Establishes HTML for the page's <meta> tags.

Parameters
  • html [required] {string} - HTML content

Back toPageGenerator Methods | Back toShopping Objects

setPageTitle(title)

Establishes a title for the page.

Parameters
  • title [required] {string} - title text

Back toPageGenerator Methods | Back toShopping Objects

setSelectedTab(id)

Causes the specified tab to be displayed as the currently active tab.

Parameters
  • id [required] {string} - unique string id for the tab

Back toPageGenerator Methods | Back toShopping Objects

showTabNavigation(show)

Indicates whether tab navigation should be shown or hidden.

Parameters
  • show [required] {boolean} - true to display navigation, false to hide it