Can't see 'App Connect Components' from 'Main Page' in 'Content Page'

Wappler: 7.3.2

Capacitor Mobile Project.

Win 11

Expected behavior:

Components in index.html page should appear in their content pages.

Actual behavior:

I’m unable to see any app connect components of index.html page.

Main: Index.html

Content Page: legal.html

Can’t see any app connect component from main page when trying to use Dynamic Events on mouse click in content page:

Not the same scenario for me:

Your first line makes a little noise for me:

path="/static/legal"

Try this:

<!-- Wappler include head-page="index.html" is="dmx-app" id="legal" appConnect="local" framework7_icons="local" framework7_8="With App Connect" -->

<div class="page">
  <div class="navbar">
    <div class="navbar-bg"></div>
    <div class="navbar-inner">
      <div class="left">
        <a href="#" class="link back"><i class="icon icon-back"></i>Back
        </a>
      </div>
      <div class="title"></div>
    </div>
  </div>
  <div class="page-content wappler-block">
    <p dmx-on:click="">example</p>
  </div>
</div>

Check the www/js/routes.js:
In my case:

var routes = [
  {
    "path": "/",
    "url": "./index.html",
    "name": "index"
  },
  {
    "path": "/page",
    "url": "./page.html"
  }
]

@franse , It’s working for all content pages created in root (www) directory along with index.html but when I create sub-folder (www/folder/content-file.html). It’s causing issues in displaying index.html components. Everything else works fine.

Temp Fix: Now I’m creating UI components of content.html file in index.html and moving into their content pages, working fine without error.

Why Sub-Folder setup is required: For an app with more than 50+ pages, I need to create sub-folders for each category to segregate them.

I think creating content-pages in Sub-Folders couldn’t be an issue.

Requesting to correct me If I’m missing something or misunderstanding. :folded_hands:

Yes, you're right, under folders the page doesn't catch anything else.

Seems the problem is that Wappler doesn't handle the main layout correctly when the content-page is created

Try changing in header:

<!-- Wappler include head-page="index.html" is="dmx-app" id="legal" appConnect="local" framework7_icons="local" framework7_8="With App Connect" -->

This:

head-page="index.html"

To this:

head-page="../index.html"

PS: On a nodejs project the main layout is present on routes.js file, but not on a mobile project, so maybe @George this can be added as well?

That’s correct @franse. But we would appreciate if this will be auto generated by Wappler itself, instead of doing manual correction. I think this is bug which needs to be fixed so that it doesn’t require manual corrections.

1 Like

I believe this is related - Limited access to serverconnect server actions on a content page from partial