Hey Everyone,
Is there anyway I can access variables from inside nested Controls? Its probably easier to explain it using a few code snippets. The below code works and does pretty much what you'd expect. It prints out a list of venues then a list of campaigns for each venue and then a list of products for each campaign.
<% control Entities %>
<h3>$EntityName</h3>
<% control Campaigns %>
<h4><a href="/browse-campaigns/view/$ID">$Name</a></h4>
<% control Products %>
<h5>$Name - $Count</h5>
<% end_control %>
<% end_control %>
<% end_control %>
This works, but I don't really want it to be structured hierarchically like this instead I would just like a plain list of products, but I also want to output the variables for each entity and campaign. Basically I am trying to do something like the below. Is there any way to achieve this or am I better of changing the structure of the array data that I am using?
<% control Entities %>
<% control Campaigns %>
<% control Products %>
<h3>$Entities.Name</h3>
<h4><a href="/browse-campaigns/view/$Campaigns.ID">$Campaigns.Name</a></h4>
<h5>$Name - $Count</h5>
<% end_control %>
<% end_control %>
<% end_control %>