import{_ as e}from"./chunks/plugin-vue_export-helper.BCo6x5W8.js";import{c as a,a as s,b as t,r as i,o as n}from"./chunks/runtime-core.esm-bundler.Xt1Ml84y.js";const o=JSON.parse('{"title":"Shopping Experiences","description":"","frontmatter":{"head":[["meta",{"name":"og:title","content":"Shopping Experiences"}],["meta",{"name":"og:description","content":"This guide will discuss how to use and customize Shopping Experiences in your Shopware Frontends project."}],["meta",{"name":"og:image","content":"https://frontends-og-image.vercel.app/Shopping%20Experiences?fontSize=150px"}]],"nav":{"position":20}},"headers":[{"level":2,"title":"How it works","slug":"how-it-works","link":"#how-it-works","children":[]},{"level":2,"title":"Install the package","slug":"install-the-package","link":"#install-the-package","children":[]},{"level":2,"title":"How to build Pages, Elements and Blocks?","slug":"how-to-build-pages-elements-and-blocks","link":"#how-to-build-pages-elements-and-blocks","children":[]}],"relativePath":"framework/shopping-experiences.md","filePath":"framework/shopping-experiences.md"}');const l=e({name:"framework/shopping-experiences.md"},[["render",function(e,o,l,p,r,h){const c=i("PageRef");return n(),a("div",null,[o[0]||(o[0]=s('<h1 id="shopping-experiences" tabindex="-1">Shopping Experiences <a class="header-anchor" href="#shopping-experiences" aria-label="Permalink to &quot;Shopping Experiences&quot;">​</a></h1><p>This guide will discuss how to use and customize <a href="https://docs.shopware.com/en/shopware-6-en/content/ShoppingExperiences" target="_blank" rel="noreferrer">Shopping Experiences</a> in your Shopware Frontends project.</p><h2 id="how-it-works" tabindex="-1">How it works <a class="header-anchor" href="#how-it-works" aria-label="Permalink to &quot;How it works&quot;">​</a></h2><p>Shopping Experiences are implemented as a dedicated package that you can install in your project.</p><p>If your project is based on the <a href="/getting-started/templates/demo-store-template.html">Demo Store Template</a>, that package is already installed. If you are using a custom template, follow the instructions in <a href="#install-the-package">Install the package</a> first.</p><h2 id="install-the-package" tabindex="-1">Install the package <a class="header-anchor" href="#install-the-package" aria-label="Permalink to &quot;Install the package&quot;">​</a></h2><p>The <code>@shopware/cms-base-layer</code> package provides an implementation of all default CMS components in Shopware&#39;s Shopping Experiences. It uses Tailwind.css syntax for styling. You will now use it to render a content page.</p><p>First of all, add the package to your project:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -D</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @shopware/cms-base-layer</span></span></code></pre></div><p>Next, you need to register all components in its <code>components/public</code> directory globally. How to do it, depends on your environment. However, the package also comes with a nuxt module which does that for you. So in any Nuxt application, you can just add if to the <code>modules</code> section of your Nuxt config file:</p><div class="language-diff vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">diff</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">/* nuxt.config.ts */</span></span>\n<span class="line"></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">export default defineNuxtConfig({</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">  /* ... */</span></span>\n<span class="line"><span style="--shiki-light:#B31D28;--shiki-dark:#FDAEB7;">- modules: [/* ... */, &quot;@shopware/nuxt-module&quot;],</span></span>\n<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">+ modules: [/* ... */, &quot;@shopware/cms-base-layer&quot;],</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="how-to-build-pages-elements-and-blocks" tabindex="-1">How to build Pages, Elements and Blocks? <a class="header-anchor" href="#how-to-build-pages-elements-and-blocks" aria-label="Permalink to &quot;How to build Pages, Elements and Blocks?&quot;">​</a></h2>',12)),t(c,{page:"../getting-started/cms/",title:"BUILDGING > CMS",sub:"See the buliding chapter about CMS."})])}]]);export{o as __pageData,l as default};
