href not rendering correctly
-
Hey there,
I am testing your plugin as we are considering to use it for outputting our CRM-Data to our Website.
So far everything works, but trying to display links which are saved as text fields in D365. It seems that if we put Twig’s Curly Brackets as the href, the plugin returns the following error: Unexpected error: Unexpected character “&” in “template_10243…”
Here’s an example that works, as long as there is only plain text / a regular link in the href (<td>{{ record[“ud_name”].value}}</td>):
[msdyncrm_twig] {% view entity="ud_tutorial" name="Website | CA-Kurse (kommende)" count="10" cache="PT60M" %} <table class="crm-table-wrapper striped" style="border:none"> <thead class=""> <tr class="crm-table-th"> <th style="width:5%"></th> <th style="width:15%">Kurs</th> <th style="width:15%">Durchführung</th> <th style="width:12%;">Beginn</th> <th></th> <th style="width:50%">Ende</th> </tr> </thead> <tbody> {% for recordId, record in entityview.rows %} <tr> <td>{{ record["ineko_booking_status"].value}}</a></td> <strong><td><a href="test">{{ record["ud_name"].value}}</a></td></strong> <td>{{ record["udc_executionmode"].value}}</td> <td>{{ record["ud_startdatetime"].value | date('d.m.Y') }}</td> <td> – </td> <td>{{ record["ud_enddatetime"].value | date('d.m.Y') }}</td> </tr> {% endfor %} </tbody> </table> {% endview %} [/msdyncrm_twig]
This on the other hand does not work:
[msdyncrm_twig] {% view entity="ud_tutorial" name="Website | CA-Kurse (kommende)" count="10" cache="PT60M" %} <table class="crm-table-wrapper striped" style="border:none"> <thead class=""> <tr class="crm-table-th"> <th style="width:5%"></th> <th style="width:15%">Kurs</th> <th style="width:15%">Durchführung</th> <th style="width:12%;">Beginn</th> <th></th> <th style="width:50%">Ende</th> </tr> </thead> <tbody> {% for recordId, record in entityview.rows %} <tr> <td>{{ record["ineko_booking_status"].value}}</a></td> <td><a href="{{record["ud_name_url"].value}}">{{ record["ud_name"].value}}</a></td> <td>{{ record["udc_executionmode"].value}}</td> <td>{{ record["ud_startdatetime"].value | date('d.m.Y') }}</td> <td> – </td> <td>{{ record["ud_enddatetime"].value | date('d.m.Y') }}</td> </tr> {% endfor %} </tbody> </table> {% endview %} [/msdyncrm_twig]
The String that we are trying to put as the href does not contain an ampersand, as mentioned in the error message. Am I missing something or maybe just using the wrong syntax?
Looking forward to your replies.
Best
Kim
- The topic ‘href not rendering correctly’ is closed to new replies.