DMXzone App Connect Support Product Page

Answered

how do i display an image from a database?

8 years ago Bruce Wilkie posted:
I've tried adding a dynamic attribute for the image, resulting in the following:

<img src="images/courses/" alt="{{course_name}}" class="img-responsive" title="{{course_name}}" dmx-bind:src="course_thumbnail">

But it's not showing the image. I couldn't see anywhere in the dynamic attribute to specify that the image is in the subfolder images/courses, so I put that into the scr attribute to see if that worked but it hasn't.

Could you let me know how I do this?

thanks

Replies

Replied 8 years ago
8 years ago Tom Dupre replied:
Try using dmx-bind:src, eg:

<img alt="" class="img-responsive" dmx-bind:src="jpegs/{{stock_id}}.jpg" />

I don't know if there is somewhere listing such information; I haven't found it if there is. I found the above by looking at one of the showcase examples.

Replied 8 years ago
8 years ago Bruce Wilkie replied:
Thanks Tom

Worked nicely
Replied 8 years ago
8 years ago Teodor Kuduschiev replied:
Hello Bruce, Tom,

In order to add dynamic src you just need to:
1. Add empty image tag on your page - or add it from the Insert > Image DW menu.
2. Click the added image
3. In app connect - select Dynamic Attributes > image > source
4. In the type dropdown in the dynamic data picker, switch to "Template" this allows you to use both static and dynamic values in the field. Enter your static path, then click the image binding and it will be added.
Replied 8 years ago
8 years ago Tom Dupre replied:
Thanks Teodor.
Replied 8 years ago
8 years ago Bruce Wilkie replied:
Thanks Teodor. Working for me too now
Replied 4 years ago
4 years ago Vivian Eersels replied:
in app connect, I can't find Dynamic Attributes? (using dreamweaver 2021)
Replied 4 years ago
4 years ago Teodor Kuduschiev replied:
What do you mean? Select the element you need and the dynamic attributes appear in the Properties section in App Connect panel.
Replied 4 years ago
4 years ago Vivian Eersels replied:
found it now , sorry i looked in the wrong part of the app

Reply to this topic