Can I use a Twig template as a condition in Pro - e.g. use an if/then/else in a template to return true/false, and test that value to drive the Pro page structure?
Yes, anywhere you can use Dynamic Content (with the exception of the Dynamic Content Looper) you can use Twig. See an example in this post using an ACF array field in the show condition. We will add additional notes to our Twig docs on working with Conditionals and Twig. theme.co/forum/t/acf-multi-select-or-select-box-only-return-array-as-value/110222
@@yourthemeco That is what I hoped. The next thing I'd like Josh to demo, is using a Twig if/then/else to trigger the display of Pro components, so that I can control how a page is rendered using Twig but use Pro to construct the page segments. If you see what i mean. All within a Twig Doc.
Very timely! Thanks as always!!
nice Josh... I really have to get into it, soon... Thanks
Cracking explanation as always Josh
0:34 how did you get that menu in the admin panel and set up those posts to pull from?
This is a custom ACF post type with custom fields added to it. Check out this guide: www.advancedcustomfields.com/resources/post-types-and-taxonomies/
Can I use a Twig template as a condition in Pro - e.g. use an if/then/else in a template to return true/false, and test that value to drive the Pro page structure?
Yes, anywhere you can use Dynamic Content (with the exception of the Dynamic Content Looper) you can use Twig. See an example in this post using an ACF array field in the show condition. We will add additional notes to our Twig docs on working with Conditionals and Twig. theme.co/forum/t/acf-multi-select-or-select-box-only-return-array-as-value/110222
@@yourthemeco That is what I hoped. The next thing I'd like Josh to demo, is using a Twig if/then/else to trigger the display of Pro components, so that I can control how a page is rendered using Twig but use Pro to construct the page segments. If you see what i mean. All within a Twig Doc.
We’ll keep in mind for future videos. Already have the next few planned.