Some of the faculty listed in our people pages on this site want to add a link to additional publications. I've created a URL field with the slug "more-publications-link" then tried to use that in a shortcode with a button that only appears if they have publications. But I get stuck when trying to use that URL field in a button or an <a> tag...
Here's an example of how the design went sidewise for one professor (see giant blue button at the bottom): hidden link
And here's an example of a scholar's page who doesn't have additional publications but the button still shows up - it would be better if it didn't appear at all: hidden link
Is there an example of how you want the button to appear when the user has a link in the field ?
Secondly we can use our conditional block to check if the user has a link in the URL field before displaying the section. For information on how to use the conditional blocks please follow the instructions in the link below. https://toolset.com/course-lesson/using-toolset-conditional-block/
It'd be great if the button could simply be like the "See More Publications" button on this page hidden link (though this button is not linked anywhere currently).
And I'm using the legacy version of Toolset. Is it possible to get conditional logic without blocks? Or is blocks really best here?
This would be the best option if you're not using the gutenburg editor.
If you're using our Gutenburg editor then you can use our Button block and use a dynamic URL to assign the correct URL to the button. From there you can also using the styling options for the button to style it any way you feel.
Ok so the problem you are currently experiencing isn't toolset related as wordpress core itself removed support for shortcodes in html attributes, this is why it is broken.
I was under the impression that you were using a content template to display this page which doesn't have this issue as toolset implemented special means by which you can still use shortcodes as parameters for HTML elements.
The only way to resolve this is to use a content template to create the page layout.
Thanks, Shane. I appreciate that explanation. I am creating "content templates" of a sort using Beaver Themer. But it sounds like I'd need to create "content templates" using Toolset Blocks (and enabling Gutenberg) on the site. Is that correct?