Dynamic login/logout in nav bar ssi php includee

Hi, sorry I know this has sort of been posted before, but I still cannot find the answer or a working solution, I admit I am a real newbie to Wappler but don’t want to give up on what seems such a brilliant app because I cannot make something work.

I followed the videos for building a basic system to create a user account, login, logout, that all works (initially).

I then setup a navbar and this has the logout button. I moved the navbar to a ssi php include. The navbar displays just fine.

On my dashboard page I have teh user_logout server connect and the browser bit setup, so the dashboard logout button works.

but, if I am on say the newuser page, the logout button does not work. I didnt want to add browser and user_logout to every single page, so, I tried adding the user_logout server connect and browser bits to the navbar.php ssi. But that just does not seem to work, is that because is uses the on success goto command but the headers have already been set at this point?

I basically want the logout button to work on all pages.

to confuse things further, I really want the logout button to be replaced with a login button if they log out, but can not get that working, I have a user_data_query that shows the userid etc, and have tried a dynamic attributes -> show -> user_data:ID but I always get the logout button, it disappears from the wappler design view of the navbar page but not when run through a browser when the page is a complete page.

I have wastched every video I can find, read every tutorial I can get my hands on but none seem to show a dynamic login/logout setup with the navbar in an SSI - which I assume most people would do for maintainability?

Sorry for my first long winded post, I hope it makes sense and can find an answer, I see other people asking the same but doesnt look like they got the right reply either from what I read, some threads just died.

All the best
Darren

Community Page
Last updated: