ReactPage using dynamic page routing to define the menu, we can define it flexible from the config files from app/config/route.config.js

Example:

Define the home menu and link to HomePage component:

{
    name: 'home',
    path: '/',
    title: 'Home',
    component: System.import('containers/HomePage'),
},

Get the the category video from Wordpress API, by using WpPostList component

{
  name: 'video',
  path: '/video',
  title: 'Video',
  component: System.import('containers/WpPostList'),
  options: {
    category: 'video',
  },
}

Get the contact detail page which have id #11, by using WpPage component:

  {
    name: 'about',
    path: '/about',
    title: 'About',
    component: System.import('containers/WpPage'),
    pageId: 11, 
  }

After defind the dynamic routing config, we can define list of routing menu need to be shown from the font-end via pageview.config.js

{
  name: 'home',
  path: '/',
  title: 'Home',
  icon: 'menu-home',
},
...
{
  name: 'video',
  path: '/video',
  title: 'Video',
  icon: 'menu-video',
},
...
{
  name: 'about',
  path: '/about',
  title: 'About',
  icon: 'menu-chat',
},

Result:

results matching ""

    No results matching ""