{"section":"tutorials","requestedLocale":"en","requestedSlug":"develop-the-front-end-for-the-list-feature-in-your-store","locale":"en","slug":"develop-the-front-end-for-the-list-feature-in-your-store","path":"docs/en/tutorials/storefront/layout/develop-the-front-end-for-the-list-feature-in-your-store.md","branch":"main","content":"> Tutorial valid only for Legacy CMS Stores.\n\n## Make link to access the lists section in your store\n\nThe settings below must be made through VTEX Admin, accessing **Storefront > Layout** and clicking on the **CMS** folder.\n\nTo create the html element that gives the customer access to the lists in your store's Home, you must include the code below in your template.\n\n```html\n<a href=“/giftlist”>Lists</a>\n```\n\nThe `/giftlist` route acts as the Home of the lists for each client.\n\n## Editing the lists home template\n\nIn the `new-Giftlist` template located in your store's CMS, we have already included the `<vtex.cmc:GiftListSearchV2 />` control. This control __renders the lists search__ created by your clients. See below the code rendered by this template.\n\n```html\n<div class=\"giftlist giftlist-search\">\n    <h2 class=\"glsearch-title\">Search List</h2>\n    <fieldset class=\"glsearch\">\n        <form name=\"giftlistsearchform\" id=\"giftlistsearchform\" enctype=\"multipart/form-data\">\n            <ul class=\"giftlistsearchul glsearch-ul\">\n                <li class=\"glsearch-type\">\n                    <span>\n                        <label for=\"giftlistsearchtype\">List type</label>\n                    </span>\n                    <select name=\"giftlistsearchtype\" id=\"giftlistsearchtype\">\n                        \n                        <option value=\"x\">All/Wish list</option>\n                    </select>\n\n                </li>\n                <li class=\"glsearch-id\">\n                    <span>\n                        <label for=\"giftlistsearchid\">Reference</label>\n                    </span>\n                    <input type=\"text\" id=\"giftlistsearchid\" name=\"giftlistsearchid\" placeholder=\"reference\">\n                </li>\n                <li class=\"glsearch-name\">\n                    <span>\n                        <label for=\"giftlistsearchname\">Name</label>\n                    </span>\n                    <input type=\"text\" id=\"giftlistsearchname\" name=\"giftlistsearchname\" placeholder=\"name\">\n                </li>\n                <li class=\"glsearch-surname\">\n                    <span>\n                        <label for=\"giftlistsearchsurname\">Last name</label>\n                    </span>\n                    <input type=\"text\" id=\"giftlistsearchsurname\" name=\"giftlistsearchsurname\" placeholder=\"last name\">\n                </li>\n                <li class=\"glsearch-eventlocation\">\n                    <span>\n                        <label for=\"giftlistsearcheventlocation\">Place</label>\n                    </span>\n                    <input type=\"text\" id=\"giftlistsearcheventlocation\" name=\"giftlistsearcheventlocation\" placeholder=\"place\">\n                </li>\n                <li class=\"glsearch-eventcity optional\">\n                    <span>\n                        <label for=\"giftlistsearcheventcity\">City Event</label>\n                    </span>\n                    <input type=\"text\" id=\"giftlistsearcheventcity\" name=\"giftlistsearcheventcity\" placeholder=\"city event\">\n                </li>\n                <li class=\"glsearch-eventdate optional\">\n                    <span>\n                        <label for=\"giftlistsearcheventdate\">Date</label>\n                    </span>\n                    <input type=\"text\" id=\"giftlistsearcheventdate\" name=\"giftlistsearcheventdate\" placeholder=\"date\">\n                </li>\n\n                <li class=\"glsearch-find\">\n                    <span>\n                        <input type=\"button\" name=\"giftlistsearchfind\" id=\"giftlistsearchfind\" value=\"Search\" class=\"btn\">\n                    </span>\n                </li>\n            </ul>\n            <input type=\"hidden\" id=\"giftlistsearchimagetypeid\" name=\"giftlistsearchimagetypeid\" value=\"3\">\n        </form>\n    </fieldset>\n    <div class=\"glsearch-result\"></div>\n</div>\n```\n\nInside the `new-GiftList` template, there is a subtemplate with the name `new-GiftList-Sidebar-nav`. This subtemplate contains the code snippet below and can be found in the `Sub Templates` section within `HTML Templates` in your CMS:\n\n```html\n<ul class=\"nav nav-list bs-docs-sidenav giftlist-sidenav\">\n    <li>[<i class=\"icon-chevron-right\"></i>Search a List](/giftlist/)</li>\n    <li>[<i class=\"icon-chevron-right\"></i>Create new List](/giftlist/create/)</li>\n    <li>[<i class=\"icon-chevron-right\"></i>Mange my Lists](/giftlist/manage/)</li>\n</ul>\n```\n\nThis code renders a list with __three links__:\n\n1. __Search a List__: This link takes the client to the `/giflist` route, which is the home of the lists and where the searches are carried out by the lists\n2. __Create new List__: This link takes the client to the `/giftlist/create` route, where the client creates their lists. In the next steps, we'll explain how list creation is done.\n3. __Manage my Lists__: This link takes the client to the `/giftlist/manage` route, where the client can manage their lists. In the next steps, we'll explain how list management is done.\n\n> ❗ Do not uncheck the **Authentication Required** flag already selected by default in the folders below. Identification is required for lists to be displayed for each specific user.\n\n## Editing the list creation template\n\n> ℹ️ Before editing this template, you must [create the List Type](/en/docs/tutorials/creating-a-type-of-list) that will be offered in your store. \n\nThe template for creating lists is located in the `giftlist/create` route. The default template for this route is `new-GiftList-Create`, located in the `HTML Templates` section of your CMS.\n\nThe list creation template comes with the control `<vtex.cmc:GiftListFormV2 />` by default. This control will render the list creation information __ according to the list type__ that was created.\n\nThe `giftlist / create` folder, by default, already comes with the flag marked` Authentication Required`. Because of this, a login will be requested when this section is accessed.\n\n## Edit the list management template\n\nThe template for list management is located on the `giftlist / manage` route. The default template for this route is `new-GiftList-manage`, located in the` HTML Templates` section of your CMS.\n\nThe list management template comes with the control `<vtex.cmc: GiftListManagerV2 />` by default. This control will render the lists that were created by the client in the `giftlist / create` route.\n\nThe `giftlist / manage` folder, by default, already comes with the flag marked` Authentication Required`. Because of this, a login will be requested when this section is accessed.\n\n## Editing the List Editing Template\n\nWithin the `<vtex.cmc: GiftListManagerV2 />` control located in the `new-GiftList-manage` template, an` Edit` button is rendered that takes the client to the `giftlist / edit` route. This route reads the `new-GiftList-Edit` template, where the client can edit its lists.\n\nThe list editing template comes with the control `<vtex.cmc: GiftListFormV2 />` by default. This control is the same as the `giftlist / create` route template. However, it will not render a list creation form. Considering the editing context, the control will render the information in the chosen list so that the client can edit."}