Search
Other Articles Anywhere questions
Forum

Remove IDs in repeatable custom fields

Trams's Avatar Trams
Hello,

I use AA for the output of repeatable custom fields. I have inserted the code:
<div class="event_links">{article}<span class="event_link">[event-link:text layout="false" links="false"]</span>{foreach data="event-link-more"}<span class="event_link">[row:event-link:text layout="false" links="false"]</span>{/foreach}{/article}</div>

Output is
<div class="event_links"><span class="event_link"><a id="acf_url_2950_9" href="https://www.talkshow.band/" class="acf_url" target="_blank" rel="noopener noreferrer">TALK SHOW Homepage</a></span><span class="event_link"><a id="acf_url__9" href="https://www.2343ec78a04c6ea9d80806345d31fd78-gdprlock/thetalkshowband/" class="acf_url" target="_blank" rel="noopener noreferrer">TALK SHOW Facebook</a></span><span class="event_link"><a id="acf_url__9" href="https://talkshowtalkshow.bandcamp.com/" class="acf_url" target="_blank" rel="noopener noreferrer">TALK SHOW Bandcamp</a></span><span class="event_link"><a id="acf_url__9" href="https://mx3.ch/emzyg" class="acf_url" target="_blank" rel="noopener noreferrer">EMZYG MX3</a></span><span class="event_link"><a id="acf_url__9" href="https://www.8dc6460bbbb088757ed67ed8fb316b1b-gdprlock/emzygband/?hl=de" class="acf_url" target="_blank" rel="noopener noreferrer">EMZYG Instagram</a></span></div>

So far, so good. However, Firefox now complains that the same ID "acf_url_2950_9" has been used several times, which is also true. My customer has therefore complained about this. Is there a way or setting to suppress the output of the ID?

Regards
Stefan
Peter van Westen's Avatar Peter van Westen ADMIN
What kind of field is the event-link?
If it is a url field, then you could create your own link tag using just the url.
Please post a rating at the Joomla! Extensions Directory
Trams's Avatar Trams
I've used Tassos ACF URL field ( www.tassos.gr/joomla-extensions/advanced-custom-fields#fields ). How can I get only the URLs whitout the markup?
Peter van Westen's Avatar Peter van Westen ADMIN
Not sure how that field works, but you can try:
[event-link:value]
See: docs4.regularlabs.com/articlesanywhere/d...lain-text-raw-values
Please post a rating at the Joomla! Extensions Directory
Trams's Avatar Trams
Thanks for the answer, Peter. I'm afraid these two extensions are simply not fully compatible. It is beyond my competence to judge where the problem lies. I did some more tests and removed the foreach loop and surrounding div tags for clarity. I have tried the following versions:

1: {article}<span class="event_link">[event-link:value]</span>{/article}
2: {article}<span class="event_link">[event-link:value layout="false"]</span>{/article}
3: {article}<span class="event_link">[event-link:value links="false"]</span>{/article}
4: {article}<span class="event_link">[event-link:value layout="false" links="false"]</span>{/article}
5: {article}<span class="event_link">[event-link:text]</span>{/article}
6: {article}<span class="event_link">[event-link:text layout="false"]</span>{/article}
7: {article}<span class="event_link">[event-link:text links="false"]</span>{/article}
8: {article}<span class="event_link">[event-link:text layout="false" links="false"]</span>{/article}

Test 1 and 3 result in the following code:
<span class="event_link">{"text":"TALK SHOW Homepage","url":"https:\/\/www.talkshow.band\/","target":"new_tab"}</span>

All others:
<span class="event_link"><a id="acf_url_2950_9" href="https://www.talkshow.band/" class="acf_url" target="_blank" rel="noopener noreferrer">TALK SHOW Homepage</a></span>

Unfortunately, the desired output does not seem possible. What else can I do? Do you think the problem is with the ACF URL field and I should contact Tassos? Or can you have a look?

It would be great if Articles Anywhere and ACF were fully compatible. The combination of these two extensions would open up worlds of possibilities.
Peter van Westen's Avatar Peter van Westen ADMIN
I recommend you create a layout override for the ACF link field. And use that in the Articles Anywhere code to output it the way you want.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription