PHP server side rendering

Is any way to pass a condition from server connect action or repeat area to create a server side rendering on php??

<?php if ( ***serverconnect_Action.identity == 1*** ) { ?>

```
html elements here
```

<?php } ?>

I am using like this. I dont know that was possible

<?php 
 $var = "{{name_restaurant}}";
 echo ($var);
?>

I dont know that you can use php variables like that. Thanks

Hey @Chackmool,

Just saw your reply here: Avoid rendering an HTML element via server-side condition data - #8 by Chackmool

And this new threat.

I don’t understand what you solved in this post…
What is name_restaurant inside the double curly brachets?

You can’t use app connect bindings in PHP code like this.
PHP code executes on the server, before your page is rendered and App Connect bindings are available after your page is rendered. So the App Connect expressions won’t be available when your PHP code runs.

1 Like

In addition to Teodor’s comment, you can work this out following this great @Heather_Mann’s solution:

In a few words you can use any of your api actions stored in your api folder…

Server-side rendering for PHP is now available in Wappler 7.7.2
It works similar to the NodeJS integration.

You can select a server action on the Layout or on the Content page (or on the Full Page also):

Then in code view place the cursor where you want the srever-side data and click the Server Side Binding button:

In the Data Picker select the data you need from your Server Action under Output:

And the server-side expression is added on the page:

<p><?= _parse('page_content') ?></p>