Hello, I see some tb-dynamic shortcodes in the code snippet you shared. Those are internal blocks source codes, not usually exposed to the end User for editing purposes. There is no documentation available for them here on the site because they are not really meant to be public or editable, but used behind-the-scenes to implement block editing. I suspect you had a block in the block editor in the past, then converted that block to expose the block source code somehow. It could happen if the block became corrupted and the system attempted recovery of the block but was unsuccessful. Either of those processes may have left some tb-dynamic shortcodes exposed, but it's not a good idea to manually edit content that includes these shortcodes.
The problem with making changes now is that it implies you can convert the resulting source code back to a standard Toolset Block. If you try to do that, even if it is successful, the customizations you add could be lost during future edits. To produce a dynamic URL like you have described, I suggest using our documented shortcodes in a custom HTML block instead - that way there is no confusion about what content is native blocks vs. customized blocks source code. Assuming your field slugs are abook-audible-link (the URL) and abook-cover (the image), here is an example implementing the existing Types field shortcode to include the custom field values in the markup produced by this template or post:
<a href="[types field='abook-audible-link' output='raw'][/types]" target="_blank" rel="noreferrer noopener">[types field='abook-cover'][/types]</a>
You can use this code in a custom HTML block. The Types field shortcode gives you access to field options and other features available with the standard Types Field API, like image sizes and cropping, captions and alt text, link formatting for the URL, etc. You can see more about those available options here:
https://toolset.com/documentation/customizing-sites-using-php/functions/
Click the orange "+ More" link below each field type to see shortcode examples implementing some of the available attributes for each field type.
- Notice I have not added any options to the Image field shortcode, so the default options will be implied.
- If you want to display a specific size of the image, for example, you could add size="thumbnail" or set a custom size with height="100" width="200".
- Notice I have used the "raw" output mode for the URL field, which produces the raw URL string as opposed to a formatted HTML link tag.
- Notice I have nested single quote marks inside double quote marks, i.e. shortcodes nested in HTML tag attributes or other shortcode attributes.
Let me know if you have additional questions about using the Types field shortcode in your Blocks design, and I can provide more direct guidance if needed.