Skip Navigation

[Resolved] Altering tb-dynamic shortcode output/documentation

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

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 4 years, 5 months ago.

Assisted by: Jamal.

Author
Posts
#1976073

Tell us what you are trying to do?
I am trying to take the output of a dynamic field and feed it into a pdf embedder shortcode to display an embedded pdf in a custom type display template.
I am currently trying
[pdfjs-viewer viewer_width=0 viewer_height=800 url="[tb-dynamic provider='__current_post' post='current' source='toolset_custom_field|field-group-for-journal-issues' field='pdf' force-string='first' ]" download=true print=true fullscreen=false fullscreen_target=false fullscreen_text="on" zoom=0 search_term="" ]
Which very nearly works, but the pdf filename is wrapped in a link and some spans, which mean it doesn't work.

Should I just bite the bullet and work out how to do php templates?

Is there a way of getting the file field shortcode to output just its content without the like?

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?
Sorry hidden

#1976585

Hello and thank you for contacting the Toolset support.

The tb-dynamic shortcode is not documented and is not intended to be used as a shortcode. Instead, use the types shortcode with the output="raw" attribute:

[pdfjs-viewer viewer_width=0 viewer_height=800 url="[types field="pdf" ouput="raw"][/types]" download=true print=true fullscreen=false fullscreen_target=false fullscreen_text="on" zoom=0 search_term="" ]

Read more about it here https://toolset.com/documentation/customizing-sites-using-php/functions/#file