The {WEBPAGE-NAME} QuickCode Tag may be used to display the name of one of the store's active custom webpages. This QuickCode Tag may be used in one of two ways:
- The SID number of a specific custom webpage may be added as a parameter ({WEBPAGE-NAME:X})
- The parameter may be omitted, and the tag may instead be placed inside the webpage block ({WEBPAGE-BLOCK-BEGIN} {WEBPAGE-NAME} {WEBPAGE-BLOCK-END})
{WEBPAGE-NAME:X}
{WEBPAGE-NAME} accepts the SID number of any of the store's custom webpages as a parameter. For instance, {WEBPAGE-NAME:1} would be used to display the name of the store's custom webpage with the SID number 1. With this approach, the webpage name will be displayed even if the specified custom webpage is inactive. In order to prevent displaying the names of inactive custom webpages in the storefront, {WEBPAGE-NAME:X} should be placed between {IF-CUSTOM-WEBPAGE-ACTIVE-BEGIN:X} and {IF-CUSTOM-WEBPAGE-ACTIVE-END}. This combination of QuickCode Tags may be used in any storefront template, and is often used in the footer section of the universal template to add links to specific custom webpages, such as an "About Us" page and a "Store Policies" page.
{WEBPAGE-BLOCK-BEGIN} {WEBPAGE-NAME} {WEBPAGE-BLOCK-END}
{WEBPAGE-NAME} may be used between {WEBPAGE-BLOCK-BEGIN} and {WEBPAGE-BLOCK-END} in order to display the name of each of the store's active custom webpages. This approach is implemented in the default "Page Index" template (sitemap_webpages.tpl) to display the list of all of the store's active custom webpages.
| Tip | View an example "Page Index" list of custom webpages in the Modular Merchant demo store. |
With this approach, content between {WEBPAGE-BLOCK-BEGIN} and {WEBPAGE-BLOCK-END} is displayed once for each of the store's active custom webpages, in alphabetical order by webpage name. The first time the content is added to the page, {WEBPAGE-NAME} will automatically display the name of the first of the store's active webpages. The second time the content is added to the page, {WEBPAGE-NAME} will automatically display the name of the second of the store's active webpages, and so on.
When {WEBPAGE-NAME} is placed in the webpage block, the SID number parameter should not be used. |