Articles Field

[url] value

1 year 2 weeks ago #87291

Ronny Van Der Borght's Avatar Ronny Van Der Borght

Dear Peter and people at Regular Labs,

The new Articles Field 3.0 is great. It opens a world of oportunities.
There is however a small issue that I want to mention/ask, I don't know if it is a bug or a feature.
When you do a 'Custom html' the output is not consistent.

Example:

When I define my custom as output as:

<a href="[url]">[title]</a><br/>

The output is:
<a href="/nl/jobs/schoonmaker-full-time">Schoonmaker Full time</a><br/>, <a href="/nl/jobs/schoonmaker-part-time">Schoonmaker Part time</a>

When I define my custom output as:
<a href="[url]">[in-de-vestiging]</a><br/>

The output is:
<a href="/nl/jobs/schoonmaker-full-time"><a href="/nl/duinenwater">Duinenwater</a></a><br/><a href="/nl/jobs/schoonmaker-part-time"><a href="/nl/elshout">Elshout</a></a>
Notice the double a-tags.

[in-de-vestiging] is a linked field. I just want to use the linked value as the title, so it needs to be rendered as text only (without the accompaning url).
Is this wanted behaviour ?

1 year 2 weeks ago #87292

Andrea Malalana's Avatar Andrea Malalana Moderator

Not exactly sure what you're trying to do. You're trying to output an Articles Field inside another Articles Field? If so, it's inevitable that you're going to get a link within a link.

If you need to output just the text without the link, then you need to switch off the link from the layout of [in-de-vestiging]

1 year 2 weeks ago #87293

Ronny Van Der Borght's Avatar Ronny Van Der Borght

Thanks, now I understand, the output from a linked field is also used in the output of an other field.
Makes sense 🙂
I now changed the output for [in-de-vestiging] to:

[in-de-vestiging]
and that does the trick.

1 year 2 weeks ago #87294

Andrea Malalana's Avatar Andrea Malalana Moderator

Cool!

1 year 2 weeks ago #87295

Andrea Malalana's Avatar Andrea Malalana Moderator

Actually that's probably wrong. The output for [in-de-vestiging] should probably be just

[title]

1 year 2 weeks ago #87296

Ronny Van Der Borght's Avatar Ronny Van Der Borght

Andy Badwool wrote:

Actually that's probably wrong. The output for [in-de-vestiging] should probably be just
[title]

My bad...it is indeed [title], i did a wrong copy and paste.
Sorry for the confusion.

1 year 2 weeks ago #87298

Andrea Malalana's Avatar Andrea Malalana Moderator

No problem, glad it works now 🙂