DMXzone App Connect Support Product Page

Answered

how do i display an image from a database?

Asked 17 Mar 2017 16:15:22
1
has this question
17 Mar 2017 16:15:22 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 17 Mar 2017 17:51:27
17 Mar 2017 17:51:27 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 17 Mar 2017 18:00:16
17 Mar 2017 18:00:16 Bruce Wilkie replied:
Thanks Tom

Worked nicely
Replied 18 Mar 2017 11:50:35
18 Mar 2017 11:50:35 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 18 Mar 2017 12:34:24
18 Mar 2017 12:34:24 Tom Dupre replied:
Thanks Teodor.
Replied 20 Mar 2017 14:51:54
20 Mar 2017 14:51:54 Bruce Wilkie replied:
Thanks Teodor. Working for me too now
Replied 20 Jan 2021 09:35:19
20 Jan 2021 09:35:19 Vivian Eersels replied:
in app connect, I can't find Dynamic Attributes? (using dreamweaver 2021)
Replied 20 Jan 2021 10:14:20
20 Jan 2021 10:14:20 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 20 Jan 2021 10:16:32
20 Jan 2021 10:16:32 Vivian Eersels replied:
found it now , sorry i looked in the wrong part of the app

Reply to this topic