The {WEBPAGE-URL} QuickCode Tag may be used to create a link to 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-URL:X})
- The parameter may be omitted, and the tag may instead be placed inside the webpage block ({WEBPAGE-BLOCK-BEGIN} {WEBPAGE-URL} {WEBPAGE-BLOCK-END})
{WEBPAGE-URL:X}
{WEBPAGE-URL} accepts the SID number of any of the store's custom webpages as a parameter. For instance, {WEBPAGE-URL:1} would be used to create a link to the store's custom webpage with the SID number 1. With this approach, the link will be created even if the specified custom webpage is inactive. In order to prevent links to inactive custom webpages from being displayed in the storefront, {WEBPAGE-URL: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-URL} {WEBPAGE-BLOCK-END}
{WEBPAGE-URL} may be used between {WEBPAGE-BLOCK-BEGIN} and {WEBPAGE-BLOCK-END} in order to create a link to 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-URL} will automatically create the URL of the first of the store's active webpages. The second time the content is added to the page, {WEBPAGE-URL} will automatically create the URL of the second of the store's active webpages, and so on.
When {WEBPAGE-URL} is placed in the webpage block, the SID number parameter should not be used. |