Menu
Feedback
Start here
Tutorials


Creating and editing a page template

Tutorial valid only for Legacy CMS Portal stores.

The page template is a model designed to define an HTML structure for displaying page content.

You can use this template to reference the JS and CSS files that will be used on a specific page, as well as other templates, like shelf templates or subtemplates.

In addition, page templates are also responsible for including components such as banners, suggestion shelves and other features available on the platform.

At VTEX, the user has the option of either creating new templates or editing existing templates.

To create a new template, we recommend that you use a default template as a base.

Check out the walk-through:

  1. In the VTEX Admin, access Storefront > Layout.
  2. Click on the CMS folder.
  3. Click on __HTML Templates __.
  4. Just below, click on New template.
  5. Fill in the Template Name field.

When filling in the Template Name, avoid using the following reserved words, as this can hinder your store's performance and interfere with the functioning of VTEX Admin pages. See the list of reserved words below.

  • a
  • meta
  • api
  • admin
  • app

  1. Then fill in the Template XHTML box with your template code.
    {"base64":"","img":{"width":453,"height":183,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":78092,"url":"//images.ctfassets.net/alneenqid6w5/1BJRfbclbjHPUSztB6y0kP/bd95af131b622a00d9b41dee47789987/4_1.png"}}
  2. Click on the Save Template button.

To edit an existing template, the process is almost identical.

But instead of clicking on the New Template option, you must click on the template you want to edit.

Check out the complete walk-through below:

  1. In the VTEX Admin, access Storefront > Layout.
  2. Click on the CMS folder.
  3. Click on the desired template option.
  4. Make the necessary changes.
  5. Click on the Save Template button.
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 3 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
URL Mapping (301 Redirect)
« Previous
Creating a shelf template
Next »
Contributors
3
Photo of the contributor
Photo of the contributor
Photo of the contributor
+ 3 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback