Skip Navigation

[Resolved] Creating a View with a list of file downloads

This support ticket is created 2 years, 10 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.

Our next available supporter will start replying to tickets in about 1.79 hours from now. Thank you for your understanding.

This topic contains 2 replies, has 2 voices.

Last updated by Del_W5502 2 years, 10 months ago.

Author
Posts
#2270955

Tell us what you are trying to do?
I've created a post type called Resources & Media. To the post type I've added a repeatable group with a file field (used to upload pdf files) and a single line filed (to be used for a title that will link to the pdf file). I want to be able to create a view that list the titles that link to each pdf that has been uploaded. The Toolset button block allows me to accomplish something similiar to what I want. It allows me to make the button text dynamic and the button url dynamic. I can then choose the title field as the dynamic button text and the file field as the dynamic button url . My preference would be to just have a list of links that are not buttons. What is the best way to accomplish this?

Another option I tried was to use the Single Field block and select the file field. This by itself list the url to the upload pdf. Under "Field Settings" there is an option to add your own "File link title" but I'm not sure if it's possible to make this dynamic and use the title field here?

Thanks for your help.

#2271299

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

It would probably be easiest to use the Fields and Text block for this, which lets you add arbitrary HTML to the page and mix in shortcodes to provide dynamic values as needed.

Insert a Fields and Text block, switch to the HTML tab, then start typing in the HTML for a link. When it comes to the href attribute use the little orange Toolset-logo button to bring up the a selection of dynamic content you can insert via shortcode, and choose the custom field for the file, raw output (to just output the url). Then continue with your HTML for the link, and for the link text use the button again to insert the shortcode to output the text field.

It should end up looking something like this (you can just paste this in, editing the slugs of your fields).

<a href="[types field='file-field-slug' output='raw'][/types]">[types field='title-field-slug'][/types]</a>
#2271355

That was what I needed. Thank you for your excellent help.