Custom URL Structure

You can customize your URL structure for pages generated by a template through dynamic values, text values, or a combination of the two.

🚧

When updating your Template's URL structure, consider if your Templates' SEO URL structure will also need to be changed. Changing one does not affect the other.

To customize a template's URL structure:

  1. Click on Templates on the menu.
  2. Click the 3 dots next to the template you want to edit.
  3. Click on Edit custom URL.

The URL structure is a simple string with a few dynamic placeholders that are replaced with actual values when generating the page paths. You may also specify any portion of your URL structure using specific text values. Below are the available placeholders you may use to dynamically generate any portion of your URL structure:

  • {{contentGroupName}} - Content group name
  • {{contentItem.<fieldName>}} - Content item field name
  • {{contentItemName}} - Content item name

Below you can find examples and a more detailed explanation for each placeholder:

Custom URL

Generated Path

/{{contentGroupName}}/{{contentItem.path}}

/products/my-custom-path

/{{contentItem.url}}

/my-custom-full-path

/specials/{{contentItem.path}}

/specials/my-custom-path

/{{contentGroupName}}/premium/{{contentItem.path}}

/products/premium/my-custom-path

If we were to translate the existing default URL structure logic for content groups, they would be like the table below:

Content Group

URL Structure

Shopify Products

/products/{{contentItem.slug}}

Shopify Collections

/collections/{{contentItem.slug}}

BigCommerce Products

/{{contentItem.url}}

BigCommerce Categories

/{{contentItem.url}}

Custom Content Groups

/{{contentGroupName}}/{{contentItemName}}

See URLs for more information.

🚧

The same URL structure logic is not used for all templates and this is only an example.

Content Group Name

{{contentGroupName}}

This placeholder will be replaced by the content group's name, after being turned into a slug.

📘

The process of generating a slug will try to create ASCII based URLs without spaces or special characters.

Example

Assuming a template: /{{contentGroupName}}

Products/products

Special Cats/special-cats

Perfect ® Products/perfect-products

Content Item Field

{{contentItem.<field>}}

This placeholder is replaced with the content of the specified <field> for each content entry.

Any content set on the entry's field will be used here, without alteration. Here are some tips for creating good URLs.

Example

{{contentItem.url}} will use the content from the url field of the content item for that group.

{{contentItem.customPath}} will use the content from the customPath field of the content group

Content Item Name

{{contentItemName}}

This placeholder is replaced with the content item's name field. Note that the name field may vary depending on the content group. For products, for example, the name field is slug.

This value is then turned into a slug before being replaced.

Example

When my content group has a field Custom Name flagged to represent the entry name, the value used will be what is set in that field.

If we change the field Display Name to represent the entry name, all paths will now use that value instead.


Did this page help you?