Hello,
Beda was previously handeling this...
Please assign this ticket to him.
I am trying to:
Have each File Value display with it's own icon and name under it.
Link to a page where the issue can be seen:
The issue is on the Single Custom Posts, which are using a content template with VIEWS.
One sample of the error here:
hidden link
See my screen notes attached.
I expected to see:
5 Icons named and linking to their according file.
Instead, I got:
One Icon with no link and no name.
This is the code in my Views template:
<div class="col-sm-8">
<H3>Files:</H3>
</div>
</div>
Thank you!
This is a repeatable Field, but you did not insert this with any separator or similar.
Please use the GUI to insert the Field.
You will then see an option to add Custom Separators and more.
I changed your code from:
<H3>Files:</H3>
<a href="[types field='files' output='raw'][/types]" target="_blank"><img src="<em><u>hidden link</u></em>" /></a>
to:
[types field="files" link="true" title="<img src='<em><u>hidden link</u></em>' />" class="css class" style="inline style" separator="<br>"][/types]
As you see I use your Image placeholder as the Link Title and a custom separator (br) to bring them all on a new line.
Each of the Images now links to the file.
Please note (this is VERY important) that WordPress basically forbids using ShortCodes like that.
Now, we added our own magic to make this possible.
But you still need to pay high attention to "" and '' apostrophes.
As you see, I explicitly edited my ShortCode to use "" and '' in every specific place.
The idea is that either you use "" in the outer parts and '' in the inner or the opposite.
You will usually get a hint by the syntax highlighting. Red color means there is something wrong with the syntax and mostly it's due to wrong apostrophes.
Oh wow!, thanks a lot Beda,
That's a very nifty trick..
I used the
Could you also walk me through displaying the names with .extensions under each file?
People would need to know which is which : )
That isn't possible with repeatable Fields.
But there are some workarounds and Custom Code solutions:
https://toolset.com/forums/topic/another-vote-for-showing-filename-only-in-list-of-attached-files/#post-384962
The feature request to allow this is already filed and accepted.
You can also use Post Types as repeatable fields:
https://toolset.com/documentation/user-guides/creating-groups-of-repeating-fields-using-fields-tables/
But that would require a full refactor of your current setup.
Thank you for the response Beda, I'll work on implementing those.