Many errors when slicing template files to ssi

OS info

  • Operating System : Mac OSX 17.7.0
  • Wappler Version : 1.2.2

Problem description

I am trying to create a master template for my theme. Meaning that I am trying to slice it into parts like header.php, footer.php, nav-bar.php so on.

Steps to reproduce

  1. Unable to to put a php require inside the head tag when I save wappler moves the code inside the body tag
  2. Unable to replace entire head with php require. Wappler adds html, and head tags on save, thus duplicating
  3. I place the cursor in the code view and click the plus sign to add SSI, the cursor jumps to the top of the code, just after the body tag, and inserts the ssi code there instead of where I wanted it.
  4. The App tree view doesn’t recognise my items in the code so I am unable to use the move to include button anywhere. Only input fields are visible in the App tree view
  5. The code editor highlights <?php as error code (red underlined)
  6. As I was unable to use the “move to include file” it took me a while to find an answer in the forum that the ssi file needed to render in design view and NOT to add html, head, body tags every time I saved. (very annoying)

Hi Tina,

The current implementation of SSI includes is focused on content (in the body) includes. To allow more easy content reuse.

Complete header and footer includes are not that easy as you might think and not just a matter of moving the header/footer content. This is because Wappler does a lot of automatic modifications of the header for example when adding various script includes and css files.

So if you just move the head to an include Wappler won’t find it and will included the scripts directly which is probably not what you want.

So for this we will be introducing later on a special dedicated header and footer includes, so that Wappler is well aware of those and knows where to make adjustments.

See also: