Create a file download in the web browser with any template contents, allowing you to turn any template into dynamic downloadable files.
To use this plugin, place the plugin tag around the content that you wish to send to the browser as a file download, supplying the desired file name. Optionally, the file can also be saved to disk on the server.
For example, how about downloadable vCards from your staff directory Channel?
{exp:channel:entries limit="1" require_entry="yes" channel="staff_directory"}
{exp:download_content filename="{first_name} {title}.vcf"}
BEGIN:VCARD
VERSION:3.0
N:{title};{first_name};;;
FN:{first_name} {title}
ORG:Acme\, Inc.;
TITLE:{contact_info:job_title}
TEL;TYPE=CELL,VOICE:{contact_info:mobile_phone}
TEL;TYPE=HOME,VOICE:{contact_info:other_phone}
ADR;TYPE=HOME:;;{contact_info:street_address};{contact_info:city};{contact_info:state};{contact_info:zip}
LABEL;TYPE=Home:{contact_info:street_address}\n{contact_info:city}\n{contact_info:state}\n{contact_info:zip}
EMAIL;TYPE=PREF,INTERNET:{url_title}@example.com
EMAIL;TYPE=HOME,INTERNET:{contact_info:alternate_email}
REV:{gmt_edit_date format="%Y%m%dT%H%i%s%Z"}
END:VCARD
{/exp:download_content}
{/exp:channel:entries}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.