url_info

Prints information about the page stored in Maropost Commerce Cloud.

Example

[%url_info name:'page_title' /%]

Usage

The url_info function can be used with just the name parameter to pull information for the current page. Or you can add the id and type parameters to pull information from a different page.

If the page does not have content in the field specified then the url_info function will try to return the default value for the field. You can set your own default using the default parameter if required.

[%url_info type:'product' id:'[@sku@]' name:'page_heading' default:'[@content_name@]'/%]

Parameters

Name Options Description
name:'' `canonical_url`, `page_heading`, `page_title`, `meta_description`, `meta_keywords` Specifies which meta data to display. See the table below for more details
id:'' `[@sku@]`, `[@content_id@]`, `[@id@]` Specifies which page the meta data should be pulled from. Should be paired with the `type` parameter to avoid unexpected results
type:'' `product`, `item`,`content`, `brand`, `category`, etc Used with the `id` parameter to specify the type of content being displayed. If not included the function may default to the current page type instead of the page you are trying to grab
default:'' `[@content_name@]`, `[@name@]`, `[@model@]`, `[@description@]`, etc Function will default to this if there are no results stored within Maropost Commerce Cloud for the requested content. Can be left out to return the Maropost Commerce Cloud default or nothing.

Name Options

Options for the name:'' parameter.

Option Product / Content Field Example Description
`canonical_url` SEO Canonical URL /turtles-all-the-way-down If this page contains the same content as another page, this field contains a links to the page that search engines should index
`page_heading` SEO Page Heading Turtles All the Way Down by John Green (Paperback) This field overwrites the pages `

` tag, which is by default the product or content name

`page_title` SEO Page Title Turtles All the Way Down by John Green Describes an online document
`meta_description` SEO Meta Description Turtles All the Way Down is the latest novel from John Green, the author of Paper Towns While not important to search engine rankings, are extremely important in gaining user click-through from SERPs
`meta_keywords` SEO Meta Keywords Turtles All the Way Down, John Green, Paper Towns Ignored by all major search engines

Was this article useful?

Be notified when this page is updated. Optional.