/
Differences between static page & dynamic page

Differences between static page & dynamic page

This document explains what are differences between static pages & dynamic pages

  1. Static page
    Static page is created by baseCamp in folder src/pages.
    It's used to static components without Builder.
    When you create Vue files inside folder src/pages, Nuxt.js automatically generates the vue-routerconfiguration for you.
    That means you never have to write a router config again.
    Nuxt.js also gives you automatic code-splitting for all your routes.
    For more detail about creating FO components, please refer this doc: How to make FO components

  2. Dynamic page
    Dynamic page is created by Builder
    The main concept of dynamic page is creating a page in Builder with FO components. After that, it stores data as json file on backendCore. When you access to dynamic page, it will get data from backendCore to render.
    BaseCamp will call API /svc/service/page to get data of dynamic page in middleware dynamicRouteSupport
    It contains siteId, title, pageRoute and especially instance
    Instance is main object, it contains instances - array of children components which are rendered
    Ex: page Home has 3 components: Header, Slider and Footer so instances has 3 elements
    Inside any instance, it may contain other children, so baseCamp uses recursion to render all of them
    _core/components/instanceRenderer.vue
    After that, every component was rendered by instanceRenderer will start a lifecycle as normal Vue component

 

Related content

커스텀 컴포넌트 만들기
커스텀 컴포넌트 만들기
Read with this
Front Office ( Nuxt BaseCamp )
Front Office ( Nuxt BaseCamp )
More like this
How to create component for multi-sites
How to create component for multi-sites
Read with this
Basecamp Directory Structure
Basecamp Directory Structure
More like this
How to make FO components
How to make FO components
Read with this
MAPPER
Read with this