We've set up a template to download an .xsl file of entries in a number of specific categories (with much help in this SE thread) - all works fine if we hardcode the category ID but if we tray to make the template dynamic by getting the category ID from the URL segment it fails (see below).
Is it possible to dynamically set the Category ID like this? Or any other way?
{exp:http_header
content_disposition="attachment"
filename="myfile.xls"
content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
<table>
<tbody>
{exp:channel:entries channel="my channel" category="{segment_3}" disable="category_fields|member_data|pagination"
}
<tr>
<td>{title}</td>
<td>{field_one}</td>
<td>{field_two}</td>
</tr>
{/exp:channel:entries}
</tbody>
</table>
segment_3
? Or, for the test, it just has the segments 1 and 2? – Robson Sobral Jan 22 '15 at 1:45