Request a Call Back

Enter your number and one of our friendly ecommerce experts will be in touch. All fields are required.

Speak to our experts today 0333 004 0333
Speak to one of our experts today or Request a Callback
User Guides

EKM Tag: [ekm:pageid]

This tag is used to output the ID of the page you are currently viewing. The ID can be output with a page type prefix or just the ID alone.

  • Tag Information
  • Nesting This Tag
Basic Use
When used in its most basic form the pageid tag outputs both the page type and ID within brackets. This is useful if you have webpages, category pages or product pages with the same ID.

[ekm:pageid][/ekm:pageid]
                                
This outputs the following.
CATEGORY(40)
Advanced Use
You can also specify a depth to pull the ID of a category from. This can be either an integer value or 'default'.

[ekm:pageid]idonly='yes';[/ekm:pageid]
                                
This outputs the following.
40
Tag Attributes
ID Only
idonly='yes';

You can select whether or not you wish to output just the ID or both the ID and page type. In most cases you will want to output the page type as you may find that both a product, webpage or category share the same IDs.

This tag is typically used within logic statements or tags that require IDs

Value
Description
yes
This will output the ID only giving you an integer value.
no
This will output the ID within brackets and also display the page type.

Within system pages you will receive these IDs

Page
Output
Home Page
0
Category Page
CATEGORY(40)
Product Page
PRODUCT(12)
Web Page
WEBPAGE(12)
Sitemap
SITEMAP_PAGE
Terms & Conditions
TERMS_PAGE
Search Page
SEARCH_PAGE
Cart Page
CART_PAGE
Checkout Page
CHECKOUT_PAGE
Checkout Page - Fields
CHECKOUT_FIELDS
On multiple page checkout only
Checkout Page - Payment
PAYMENT
On multiple page checkout only
Unknown Page
0

The EKM system allows for some tags to be nested within other tags.

Nesting This Tag

In most cases you would nest this tag within a showdata tag's 'location' attribute or within the ekm:categorypagename tag's categorypageid attribute.

When nesting this tag need to prepend the open and close tags with nested_ and change all single quotes ' to double quotes "


[ekm:if]
    iftype='EQUALS';
    ifvalue='[ekm:nested_pageid][/ekm:nested_pageid]';
    ifvalue2='0';
    ifthen='You are on the homepage';
    ifelse='You are not on the homepage';
[/ekm:if]