No Styles or DOM panel for included files

Thank you for including SSI’s. I love using this feature for the menu bar and footer among others. But when I cut the menu bar from my main document and paste it into my include file, there is no panel to help me to modify the menu bar.

Edit: No design view either.

2nd Edit: I tried to remove this post because I was using the wrong method. All works like crazy. Thank you

Hi Ben,
You don’t have to cut/paste content in an include file. Just select the element you’d like move there and use the move to include file icon on top of app connect panel. When the include file is created by Wappler (with the “Move To Include File” icon the the App Structure panel), there is a special comment added on top:

<!-- Wappler include -->

This makes the partial html file render well in Wappler’s design view. It even gets the design frameworks used, included so it renders visually all well.

1 Like

Yes I noticed after I had posted. I am thrilled to bits. I am now trying to see if I can use this system to create a template file. At this stage the URL will look like index.php?page=home. It is a long weekend holiday so plenty of time. Will keep you updated.

1 Like

No Luck. Perhaps you guys know how to do this.

I was hoping to replace

<?php include 'inc/home.php';?>

with something like

<?php include 'inc/{{}}.php';?>

Potentially, this will insert the related content for a page with a URL of index.php?page=home etc.

Oh no you can’t do conditional includes. It is just for exactly named include files now. So you can reuse your elements like menus on different pages.

Also note that those are server side includes so you can’t mix them with client side data expressions.

As for client side includes and dynamic views, we will have a very powerful app connect router available later on that will do dynamic views includes based on expressions and routes

I have got this working OK

<?php if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 'home'; }?>


<?php include 'inc/'.$page.'.php';?>

This may be something to think about.

well interesting though… we haven’t aimed for Wappler to be a PHP generator yet :slight_smile: our primary focus is client side dynamic reactive apps with App Connect. And the Server Side is well build in its own workflow manager Server Connect - that generates the right server side code on the fly.

But you never know :slight_smile: - the future is bright for Wappler :slight_smile:

It’s (Wappler) already my favourite IDE. Very impressed. Please keep up the good work.

1 Like