我一直在尝试让 jquery ui 为我想在其中添加标签的区域工作,并且过去几天一直在尝试但没有运气!
这个想法是显示或不显示选项卡,这取决于是否有内容。同样对于内容区域,当没有条目时,也不会创建相关的 html。
开发站点的地址是http://garden.paperfish.co/index.php/problem-solving/roses
代码是:
<div id="tabs">
<ul>
{exp:channel:entries channel="plant-categories"}
{reverse_related_entries channel="diseases" limit="1" require_entry="yes"}
<li><a href="#tabs-1">ασθένειες</a></li>
{/reverse_related_entries}
{/exp:channel:entries}
{exp:channel:entries channel="plant-categories"}
{reverse_related_entries channel="pests" limit="1" require_entry="yes"}
<li><a href="#tabs-2">εχθροί</a></li>
{/reverse_related_entries}
{/exp:channel:entries}
{exp:channel:entries channel="plant-categories"}
{reverse_related_entries channel="nutrition" limit="1" require_entry="yes"}
<li><a href="#tabs-3">τροφοπενίες</a></li>
{/reverse_related_entries}
{/exp:channel:entries}
<li><a href="#tabs-4">όλα</a></li>
</ul>
{exp:channel:entries channel="plant-categories"}
{reverse_related_entries channel="diseases" limit="1" require_entry="yes"}
<div id="#tabs-1">diseases</div>
{/reverse_related_entries}
{/exp:channel:entries}
{exp:channel:entries channel="plant-categories"}
{reverse_related_entries channel="pests" limit="1" require_entry="yes"}
<div id="#tabs-2">pests</div>
{/reverse_related_entries}
{/exp:channel:entries}
{exp:channel:entries channel="plant-categories"}
{reverse_related_entries channel="nutrition" limit="1" require_entry="yes"}
<div id="#tabs-3">nutrition</div>
{/reverse_related_entries}
{/exp:channel:entries}
<div id="#tabs-4">all</div>
</div>
任何帮助将不胜感激