By calebm12 on
i am having difficulties in shaping an IF statement that will allow me to print the following line if the field is not null. Any pointers in right direction would be very appreciated. I am guessing i prob havent even written this correctly, but it works...in that it allows me to download the file by clicking 'download vcard'.
<a href="../<?php print $node->field_directory_vcard[0]['filepath']; ?>">Download Vcard</a>
Comments
Try this, with a little
Try this, with a little tweaking it should do what you cant:
Thanks for your help! For
Thanks for your help! For some reason, the if(isset was not recognizing the null field, so it was printing for every node.
I ended up running into some code that seems to do the trick though.
You will probably get PHP
You will probably get PHP notices about undefined indexes in the field is not set but I think it's fine.
where would i see these
where would i see these notices. havent seen anything yet. is my code flawed?