This is a bit of an inception-esque scenario.
I’m trying to parse some data from a CSV using the Rest add-on.
In this addon, to display the data in the template, you use the header cell as the tag.
However, I’m trying to dynamically get the header cells from a Playa tag.
The header cells are URL titles of corresponding entries.
So my template looks something like this:
<table>
<thead>
{playa_field}
<th>{title}</th>
{/playa_field}
</thead>
{exp:rest url="path_to_csv.csv" format="csv"}
<tr>
{playa_field}
<td>{{url_title}}</td>
{/playa_field}
</tr>
{/exp:rest}
</table>The {{url_title}} is where the issue lies. (Obviously double brackets like that won’t work, it’s just an example).
What I really need is the value of the {url_title} (from the playa tag) to be in its own variable in order to be parsed by the {exp:rest} tag.
So if the {url_title} is “my-entry-title”, I somehow need the tag to be {my-entry-title}.
My CSV would look something like this:
my-entry-title,another-url-title,yet-another-url-title
cell1value,cell2value,cell3valueHopefully this makes some form of sense to someone.
Thanks!