I have created a couple of Fragments now, most of them work, but the ones that have Custom Product Fields in them don't seem to want to work. I need to include YouTube videos or Audio in one of the tabs in the Page Builder Product Details Component Product Tabs. I've used the Legacy coding in the Fragment, but neither of these works:
or
What am I doing wrong?
Code:
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :YOUTUBE"> <h2>Video</h2> <div style="padding-top:8px;text-align:left;"><iframe width="480" height="360" src="https://www.youtube.com/embed/&mvt:product:customfield_values:customfields:YOUTUBE;" frameborder="0" allowfullscreen></iframe></div> </mvt:if>
Code:
<mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :AUDIO"> <div class="custom-field" id="customfields-AUDIO"><span class="bold"><audio id="audioplayer" controls=""><source src="&mvt:product:customfield_values:customfields: AUDIO;" type="audio/mpeg">Your browser does not support the audio element. </audio></span></div> </mvt:if>
What am I doing wrong?
Comment