Menu
Feedback
Start here
Tutorials


Layout Overview

This functionality is available for stores using the Legacy Portal technology.

The Layout section allows you to create your storefront with HTML and CSS.

Sites and channels

If you haven't yet created a Web Site (or want to create a new one), it's in this directory that you must go first. If you already have a Web Site, this is where you will access and manage your entire folder structure.

Sites and channels is also the place where you will be able to create and organize the layouts of your site, as we will see later.

This feature is also available for stores using Site Editor.

Binding

Before you begin to organize the content of your Web Site, it must be linked to an account name. With that, the system understands where all the information added or modified in the folders, files or code of the Web Site will be applied.

This is a fundamental process for the perfect functioning of your store, but it is also very simple. Just follow the steps of this article.

{"base64":"  ","img":{"width":1174,"height":905,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":32495,"url":"https://images.ctfassets.net/alneenqid6w5/2selXSrkaoWaqUug24Mewm/bfea4f2413f1433c6cc2b80d8c7c9a93/Binding-min.png"}}

Layouts and templates

With your Web Site created and already linked to an account name, you will need to define templates and layouts.

  • Template: here is where the code itself is written. Among other things, it determines how the information will appear on the screen, including where the placeholders will be shown. The templates are put together in the HTML Templates and Shelves Templates folders.
  • Layout: it's responsible for determining which elements will appear on a page. It is the one that sets the placeholders (elements like banners, collections and others), that will be displayed to the end user. In order to work, each layout must be linked to a single template. You can find the layouts of your Web Site organized by folders in the Sites and channels directory.

Placeholders

These are elements (DHTML Banner, HTML, Collection, Banner, Related Products) that may or may not be used in the pages of your Web Site. They are configured in the layouts (which are stored in the Sites and channels directory), but their position on the page is determined by the code in the templates (stored in the HTML Templates directory).

The layout defines which placeholders are going to be used, and what they display, but it's the code (that is, the template) that will tell you where they appear on the page.

Collection

For the CMS module, collections are placeholders that display product clusters on a particular page. These groups need to be defined in the Product Clusters (Collections) directory.

Controls

VTEX native controls render various useful and replicable features in your site templates. For example, when you enter the <vtex.cmc:productName/> control on your product page, the system will automatically render the product name.

See the complete list of native controls for templates in this article.

Custom Elements

In addition to native VTEX controls, the system allows you to create custom controls. They are stored in the Custom Elements directory, and can be used in any template, in the same way as native controls.

URL Builder

In this section you can build friendlier URLs, making the pages of your Web Site easier for the user to find.

Files Manager

To manage the files of your Web Site, you may access this directory. In it, you can add, delete and modify CSS, JavaScript, XML and image file

References

Guides

Contributors
0
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Managing content versions
« Previous
What are templates?
Next »
Contributors
0
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