LogoLogo
Build appsContact API support
  • Build apps
  • Site Templates
  • API Reference
  • Changelog
  • Introduction to Instant Site development
  • Site templates glossary
  • Develop Site templates
    • Quickstart guide to a working Site template
    • Ecwid (Lightspeed E-Series) Crane CLI tool
    • Build Site templates: project structure
      • template-name.ts
      • section-name.vue
      • content.ts
      • design.ts
      • showcases/1.ts
      • translations.ts
      • layout.ts
  • Launch Site templates
    • Step-by-step publishing guide for Site templates
    • Monetize Site templates
    • Requirements for public Site templates
    • Recommendations for building public Site templates
  • Develop custom sections
    • How to use sections without templates
    • Quickstart with custom sections without building a template

Lightspeed® 2025

On this page

Was this helpful?

  1. Develop Site templates
  2. Build Site templates: project structure

section-name.vue

The section-name.vue is the main file of the section. It contains all of the custom code and logic. You need to add multi-language support and mobile adaptability to this file as it loads on the storefront.

If you added user-defined settings in content.ts and design.ts files, you can easily import these settings to the main file. Import methods will dynamically receive user settings when the section code is loaded in the Instant Site Editor or on the storefront:

import { useImageElementDesign, useSelectboxElementDesign, useTextElementDesign } from '@lightspeed/crane';
import { useImageElementContent, useInputboxElementContent, useTextareaElementContent } from '@lightspeed/crane';

const imageText1 = useTextareaElementContent<Content>('image_text_1');
const imageContent4 = useImageElementContent<Content>('image_content_4');
const imageLink1 = useInputboxElementContent<Content>('image_link_1');

const textDesign = useTextElementDesign<Design>('image_text');
const imageDesign = useImageElementDesign<Design>('image_content');
const positionDesign = useSelectboxElementDesign<Design>('image_text_position');

IDE should highlight syntax and show fields available inside constants declared this way.

Last updated 7 months ago

Was this helpful?