Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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 test static components without API.
    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
    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

  • No labels