App Connect API Data Source Support Product Page


Data Binding in URL gets encoded

Reported 31 Mar 2020 06:49:40
has this problem
31 Mar 2020 06:49:40 Mark Giles posted:

I purchased this plugin today and got it up and running with my custom data source API.

Inside the result, the data I want to repeat is called comment, and my repeat region is setup and working correctly. Part of the repeat region is a button, and I want the button to bind to a URL.

However, the handlebars are encoded.

This did not happen in HTML 5 Data Bindings. What is the proper way to implement a URL inside an a tag?


This reply was removed on 3/31/2020 6:52:45 AM.
See the changelog
Replied 31 Mar 2020 07:00:13
31 Mar 2020 07:00:13 Mark Giles replied:
The URL for my data source is:["robotolux",0,10]

I have this working correctly, setup as follows.
Query Parameters:
method: 'condenser_api.get_blog'
params: '["robotolux",0,10]'

I want to bind

<a href="{{comment.url}}

should output something like
However, see this image for what it outputs instead: Forced to use an image because of overly aggressive WebKnight Firewall.

This output appears to be the encoded version where the handlebars are replace with a percentage7B.

How should I implement comment.url inside an a tag?
Replied 31 Mar 2020 08:11:29
31 Mar 2020 08:11:29 Teodor Kuduschiev replied:
You need to use Dynamic Attributes > Links > link if you want to use dynamic data. You cannot use dynamic {{data}} in static attributes like just href.
So your link will look like:

<a dmx-bind:href="{{comment.url}}

Replied 31 Mar 2020 08:44:25
31 Mar 2020 08:44:25 Mark Giles replied:
That worked perfectly thanks!
Replied 31 Mar 2020 08:47:38
31 Mar 2020 08:47:38 Teodor Kuduschiev replied:
For any attribute you need to use dynamic data, you need to use the dynamic attributes.

Reply to this topic