Issue with "Content Page Include:

I preface this by stating that this is my first attempt at using includes within Wappler.

Problem: The included files display properly in Wappler but not when I browse on my local Docker or on my remote Docker site.

Below is a screenshot of the App structure.

I named both of my files as .php. The content of the page is displayed on my local and remote server. Just the includes are not. I used includes for the Header (navbar) and the footer.

Any suggestions would be appreciated.

Bruce, you need to use serverside includes (PHP include) for including common elements like header and footer on your pages.
Content pages are used for single page apps.

That’s already explained in the docs:

Hi Bruce, I just finished setting up my SSI’s, here are some tips if you want them.

  1. Your problem: as Teo said, is use php include file, not content page.
  2. If you use any data actions in your include, prefix their id’s with ‘SSI_’, this is because each page that has your SSI loaded loads it’s own data actions and the SSI’s data actions. This will stop a lot of confusion when trying to pick dynamic data on a page.
  3. Put your SSI’s in a fluid container (I used a header for mine), instead of bare on the page and make that container sticky or fixed top/bottom. This can save problems with page content hidden under the SSI (especially if you want to use 2 SSI’s stacked on top of each other).
  4. If you want to use an SSI with data actions on pages with different folder levels. Remove the leading ‘…/…/‘ from the SSI’s data actions. Leave only the leading ‘/ ‘ (eg ‘/dmxconnect/api/myServerAction.php’). Leave the …/…/ on the head page file (in the comment at the top) and in the path to the SSI itself.

Thank you Teodor and Tesla. I should have known better. I checked out you link, Teodor. Thank you. I have some additional questions. I see that there are other “Include Types” listed. Can you explain the application of these options? It would also be helpful to add the explanation to your site.

Screen Shot 2020-04-21 at 6.53.32 AM

Thank you both very much.

Just select PHP Include, it’s perfectly fine for this case.

SSI (file & virtual) is a specific type of file, using a special scripting language, that is beyond most ‘low coders’.

PHP require will cause the page to not load if there is a problem with the included php file.

PHP include will let the rest of the page load if there is a problem.

1 Like