Little help with splitting up my php page

I am revamping my site and trying to tidy things up, and re writting the admin part of my site.

I created new admin templates, in my template i have the usual header, main portions and I have an aside for the left side navigation.

I have split out the header and the aside into their own ssi (php project).

it all works find, my page works, the includes work etc, BUT, now in my aside ssi I want to make some on click events, and when clicked i update my local data store etc, but, I include the data store in the page that includes the aside ssi, so, in the aside ssi there is no datastore per se, and, as such, when i click on the dynamic data picker the list is totally empty.

how can I get around this? Am i fundamentally doing something wrong? I dont want to have loads of multiple refernces to the data store in each include etc.


Try setting the App ID of your SSI to the same one used on the main page.

made no difference
i have this in the top of the ssi

<!-- Wappler include head-page="../dashboard-admin.php" appconnect="local" is="dmx-app" bootstrap5="local" fontawesome_5="cdn" components="{dmxDatastore:{}}" id="AeG" -->

the main page has appid AeG, all my pages and ssi have that app id

hi, are there any more thoughts on this? I do have my page broken into a few ssi, maybe too many, as its an admin setup, i dont need all meta data and page titles etc to be different per page, so i haev most the head details in one ssi, then my header nav in one ssi and my aside in another.

so then in the meta ssi i do most my calls to things like datastore, browser, notification as those are all things i use on every page

Just a fast thought....
You can add:
1) a variable in your sidebar ssi (id="currPage")
2) on link click set the value of the variable accordingly
3) on your pages add a pageflow enable the "auto-run" and check for the sidebar_ssi currPage.value and do what you need to do in each page depending the current page

Another safer(I think) way, would be to do almost the same thing but instead of a variable try by:
1) creating a new table "pageHolder" in your DB with columns page_id, page_Name
2) create a serveraction that updates the page_Name value of the "pageHolder" table on sidebar's link click events
3) on each of your pages, add the pageflow and do the check by running the serveraction you created and run the commands you want accoding to the page_Name value of the "pageHolder" table

*Haven't tried any of the the above... I'm trying to get used to NodeJS now and I avoid going back.
If you need help on this drop your question here

@famousmag I think the issue here is that @JamesJenkins tries to access a component located on the main page from the SSI and it's not available in the data picker.

1 Like

So, the first suggestion is out...

The second one I suppose that it could work, no?

I don't understand what exactly you have described here, but i don't think this is related.

This is the issue:

It is inside Wappler, the data picker is empty as the component is not on the main, but in the SSI include page.

@JamesJenkins are you sure the link to the head page in the comment section on the top of your SSI include is correct?
Please make sure to select the correct head page here:

If this is correct you can see the component from the main page, when calling a dynamic event on the include page:

let me push the pages live and remove the security provider from them

this is a link to the new template i am building, i have removed all the security bits from it

its very early days in building it, was trying to make it a nice template before putting in all the middleware into it, split it out into manageable ssi chunks etc

anyway, hopefully you can see what i have done wrong?


i just studied your screenshot more closely, you have it the other way around to me, you have the main page with the datastore and hte main page includes the ssi, and the ssi can access the main page datastore.

I wanted it so my main page was super clean, and i have an ssi called meta that has all my datastore, notification, browser and those bits in it, as, i uise those on all pages, because my main page will be like 100 of those pages as its not node.js so not a template as such, so, i have 100 pages all included all those elements, i just thought it would be cleaner, simpler to maintain those components like datastore in my meta ssi, once, then all my pages include that meta ssi and would get access to the datastore, etc, but, they dont.

does it make sense what i have tried to do? is there a better way? node has templates, php not so much, i did read somewhere wappler does now have some form of php templates, but i have found no documentation on it, to set it up etc.


I don’t see an issue to have these components in the main page. Why move them in a separate SSI when they are neede for so many different pages?
It will work the same but you will have to code it yourself as the UI can’t access components located in different SSI includes.

ok, well i didnt realise they were not accessible if in the ssi, the reason i put them in an ssi was to save me coding them into 100 pages, or 200 pages, and then change 200 pages if code changes etc, but guess as the components are not accessible if in the ssi to other ssi called by the main page i just have to put them into the main page


Im still really struggling with this for some reason. i start again, i setup my main page, put all the content back in it, split it back out into ssi, leaving components like datastore in the main page. i split out my header into the header ssi, made sure the app id is same as main page, but in the ssi file if i click dynamic data picker its blank and just a spinner. if it put the content back into the main page and click it it works

what i am doing wrong, its really frustring, i use the tools in wappler, so i have my main page open, i select my header section, i click the icon to move to include file, which is did, but then it doesnt work, it doesnt put the app id, no dynamic data pickers work in the ssi


You have:

  1. a main php page named dashboard-admin.php with id="AeG".
  2. SSI includes for header, sidebar etc... and all of them have the indication at the top:
  1. I suppose that the SSI files are in a subdirectory as I can see the head-page="../dashboard-admin.php"

And you cannot see/bind any of the main page's components from withing each of your SSI files...
Is all the above correct?

Can you make a small video, showing the details/settings of these basic elements (main page and the ssi files you have) and the priblem you finaly have (trying to bind values from main page's components)?

your summary is correct yes, I will try to make a video, if i can work it out, but as you say, main page, the main page has the components like datastore etc in it, i broke out my header and aside into ssi files in a subdirectory. when the ssi content was in the main page before breaking it out the dynamic data picker worked, when i broke it out into the ssi it doesnt, and i made sure the id was the same across all main and ssi files.

will try to do a video


The reason I asked for a video is because we cannot check the whole code of your page...
And untill now we have only seen a couple of parts from your page and ONLY statements like "I have done this" , "I have done that"...
All of them may look correct BUT are they actually like you say?
So many times we click on a wrong binding and we think we have it correct but its not!
Or write a code by hand and a letter is wrong or missing...

I've been there a lot of times my friend :blush:

i attach here a video, hope it is clear enough

appreciate all you say and the help, as you say, its easy to click wrongly

This spinning and no data showing remind me a wrong or not appropriate setup of something...

2 fast thoughts:

(*Also I don't know if the App Root set to Base or Page is relevent to your problem)

DON'T CHANGE IT... Just wondering, if somebody else can confirm about it