Utils

Details of the VendorFuel API Utils service.

Methods

goToPage(page)

Navigates to URL of page parameter.

Utils.goToPage('https://vendorfuel.com/');

Param

Type

Details

page

string

URL to navigate to.

getPageUrl(pageIndex, [params])

Gets a URL based on the key to a specific page in the Template Editor > Map Template Keys.

// Get the URL for the key 'catalog'.
Utils.getPageUrl('catalog');
‚Äč
// Get the URL for the key 'collection' with a query parameter.
Utils.getPageUrl('collection', {'brand':'ACME'});

Param

Type

Details

pageIndex

string

Key that is assigned to a page in the Map Template Keys section. If an invalid key is used, an error message will be returned to the console.

params

object

Query parameters (e.g. 'category=4').