How compose Views and Pages right?

Hi, Could you explain me what is a difference between Views and Pages.
Docs says that View can have additional routing and some other features. Okey, so we put our page/pages to view.
But is there some cases when I should use several view in views block, except tabs structure from docs? (https://framework7.io/docs/view.html#multiple-views-layout)
Also, I have pageS inside view, where every page will be inserted? In block with class pages? It would be great to have example of case with several pages in one view.
If I use template engine, such as jade, and work with inline pages. (Without ajax). I add stackPages option to view where pages “preloaded” and add class stacked to hide not active pages. But what about router, It would toggle classes when navigate? what about animate transition between pages? Example with inline pages would be great
Thanks.

1 Like

Not really, designed to be used for tabs only

<div class="view view-main">
  <div class="page stacked" data-name="about">
    <!-- About page content -->
  </div>
  <div class="page" data-name="home">
    <!-- Home page content -->
    ...
    <!-- Link to About page -->
    <a href="/about/">About</a>
  </div>
</div>
var app = new Framework7({
  routes: [
    {
      path: '/',
      pageName: 'home',
    },
    {
      path: '/about/',
      pageName: 'about',
    }
  ],
});

var mainView = app.views.create('.view-main', {
  stackPages: true,
});

Yes, router will do the things automatically

Oh, thanks a lot for your answer. It really helped me.

Helped me too, I’m new to working with the router and this explained a lot!