This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hi, I'm using this code in a View that you can see here hidden link
The first conditional works correctly and returns the URL of the resource file.
The second conditional does not work, and the link returns the URL of the current page.
Hi Minesh, thanks for getting back to me -
sorry I hadn't specified that the 'Resource-File' field is a 'File' type field.
I'm still quite stumped to understand why the first conditional will work and not the second :/
Thanks! Ruben
Well - I need to understand here what you want to display. The conditional statement translates that if resource file equal to empty (no value) - then what you want to display?
The second condition is resource file is empty and still you want to display resource file even though resource file value is empty.
Hi Minesh,
to clarify in detail the intended purpose of this string -
There are 2 fields belonging to the Resource post type.
Resource Title (optional)
Resource File (required)
If the Resource has been given a title
the string needs to output <a href="resource-file-url">Download 'resource-title'</a>
If the Resource has not been given a title
(which it may not have, as it may have not yet been translated via wpml)
the string needs to output <a href="resource-file-url">Download </a>
Its the second conditions output href parameter that is not being formed correctly.
Can I have problem URL to check whats happening when you say second href parameter not formed correctly. Whats your expected output?
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
OOOOH. I'm so sorry. I see know!
Users have added a whole bunch of Resource posts without uploading any resource.
I really didn't expect that. I'm SOOO sorry to waste your time.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.