We currently have a profile page that displays users products purchase on our website. One of the products they can purchase is an on-demand video and along with that video they can download 2 .pdf files. Recently it has come to my attention that they may need to add to one of the files on occasion so they want the user to be able to download the .zip file when there is one available for that product.
Here is the snippet of code for the button:
<a href="http://domain name/folder/handbook_<%= displayProductCode %>.pdf" target="_blank"><img src="images/download_handbook_btn.png" alt="Download Handbook" /></a>
The handbook_<%displayProductCode %> is how every file name will start so if there is a file called handbook_<%displayProductCode %> I need the button to link to that .zip file file. If not then I need it to default to the .pdf.
Thanks in advance.
// Uncomment only when new rewrites have been made
// Leave uncommented
$newRule = array(
'^~(.+)$' => 'index.php?pagename=user&uid=$matches&act=show',
$newRules = $newRule + $rules;