using XSL 2.0, you can do this
<article class="banner-hero banner-hero--blocks" data-nav-title="{if (//Devices//SideMenu//NavTitleCheckBox='SideMenu') then //Devices//SideMenu//NavTitle else ()}">
</article>
質問
I am trying to write an if condition inside my data attribute... right now I am receiving the xsml vaue but dont know how to put if there... when i use if outside html it works fine.. providing my code below...
http://xsltransform.net/bFukv8i/16
<xsl:if test="//Devices//SideMenu//NavTitleCheckBox='SideMenu'">
Data_Nav_Title="<xsl:value-of select='//Devices//SideMenu//NavTitle'/>"
</xsl:if>
<article class="banner-hero banner-hero--blocks" data-nav-title="{//Devices//SideMenu//NavTitle}"></article>
<script>
正しい解決策はありません
他のヒント
using XSL 2.0, you can do this
<article class="banner-hero banner-hero--blocks" data-nav-title="{if (//Devices//SideMenu//NavTitleCheckBox='SideMenu') then //Devices//SideMenu//NavTitle else ()}">
</article>