Stacked pages & routing

I’m moving a simple web app from version 1 up to the latest Framework7 version. I’m mostly there but got stuck on trying to adapt my Stacked pages.

Just a bit of background. This runs on a local webserver on the host PC. You point an iPad or other device to the server address. It provides a webpage (using Framwork7) that looks like a native mobile app containing information from our software running on the PC. This was all runing and working under version 1.

I’ve got some Javascript that builds some Stacked Pages with folders and filenames when the webpage is called. In version 1 it was easy to get a click on the foldername to open the stacked page. I realise that I need to get the router to redirect the page name to the stacked page but don’t seem to be getting it right.

The folders calling the pages are formatted like this (without the !):

<!a href=“themelist/0/” class=“item-link item-content”>…

The stacked pages are in a left hand panel and look like this:
<!div class=“page stacked” data-name=“themelist0”>…
<!div class=“page stacked” data-name=“themelist1”>…

My app javascript file is as follows:

// Dom7
var $$ = Dom7;

var myApp = new Framework7({
 // App root element
el: '#app',
// App Name
name: 'Launchpad',
// App id
id: 'com.myapp.launchpad',

// routes.js,
routes: routes,

view: {
stackPages: true,		
passRouteParamsToRequest: true,
removeElements: true,},

// Enable templates auto precompilation
precompileTemplates: true,
// Enabled pages rendering using Template7
template7Pages: true,
 // Enable swipe panel
 panel: {
 swipe: true,
 },
 });

var leftView = myApp.views.create('.view-left', {
// Because we use fixed-through navbar we can enable dynamic navbar
    iosDynamicNavbar: true,
domCache: true, //enable inline pages
stackPages: true,	
passRouteParamsToRequest: true,	
});

var mainView = myApp.views.create('.view-main');

Routes are defined as:

var routes = [
{ 
path: '/themelist/:themeid/',
async: function(to, from, resolve, reject) {
    resolve({
            	pageName: 'themelist'+to.params.themeid,
          });
},
},]

I hope that makes sense and is clear enough.

I’m using the Core Framework with a simple text editor.

Mark

Sorry, realised some of my code was missing as wasn’t use to how the forum deals with the code snippets. I’ve add ! into the html snippets as not sure how to display them properly.

Thanks again for any help.