Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Phillyman Posted August 1, 2019 Posted August 1, 2019 I have my IP Downloads set to create forum topics. Everything is great, however if a custom member field is left blank, the field will show as "Guest" when the topic is created. Here is the code, I am wondering if I can enclose it with some sort of logic to check if the field exists before echoing it out to a forum post. That way it will only output on the topic if it is actually populated. <span style='font-weight: bold;'> Uploaded By: </span> {expression="\IPS\Member::load( $file->customFields()['field_16'] )->link()" raw="true"} <span style='font-weight: bold;'>
Martin A. Posted August 1, 2019 Posted August 1, 2019 {{if $file->customFields()['field_16']}} <span style='font-weight: bold;'> Uploaded By: </span> {expression="\IPS\Member::load( $file->customFields()['field_16'] )->link()" raw="true"} {{endif}}
Phillyman Posted August 3, 2019 Author Posted August 3, 2019 On 8/1/2019 at 3:07 AM, Martin A. said: {{if $file->customFields()['field_16']}} <span style='font-weight: bold;'> Uploaded By: </span> {expression="\IPS\Member::load( $file->customFields()['field_16'] )->link()" raw="true"} {{endif}} That worked great! Thank You!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.