Dynamic images with path as a variable

I have a question.

I have images (file names) in my databank. But the path is variable. I have to put path and filename together.

I did it with php and it works on server side:
<php $path = “whatever” ?>
“class=“card”> <img class=“card-img-top” alt=“Card image cap” dmx-bind:src=”<?php echo $path ?> {{imagename}}"

but how can I do this with sever connect?

Thanks in advance

I didnt understand your variables ?
Image paths dynamic ?
Image paths dynamic and it isnt come from database ?

Your question confuses me a little, however if you come from a php background then you need to understand that AppConnect and Server Connect work differently.

Change your idea from
<?php $path = "whatever" ?>
<dmx-value id="your_app_connect_path_variable" dmx-bind:value="/whatever_with_slashes/"></dmx-value>

class="card"><img class="card-img-top" alt="Card image cap" dmx-bind:src="{{your_app_connect_path_variable}}{{image_name_from_your_server_connect_query}}"

So if you only have filenames coming from your database without paths and your paths are a set variable then you will ave a server action with a database connection step, and a database query getting all the image names.

Then in your App Structure in App Connect you will have a Server Connect step running the database query and pulling all the bindings.
Then when you bind the image source you join the path variable and the image name database query together.

Have a look at https://www.youtube.com/watch?v=uUJqFaQYWlc&index=18&t=0s&list=PLUjqTJN3byC9kK8YZkmGwjo9nrEipl2yb at about the 4’ mark.

it works fine