我试图在引导标签中显示分类术语列表。 列出如下所示的术语,但需要一些帮助才能分配到选项卡中。
使用@dipmala的指南,我来了。但仍然无法找到将子术语分成相关标签的方法。目前这个问题都在foreach循环中。
<?php $sup_terms = get_terms("supplier_categoties", array("orderby" => "slug", "parent" => 0, "hide_empty" => false)); ?>
<ul class="nav nav-tabs sup_cats" role="tablist">
<?php foreach($sup_terms as $key => $sup_term) : ?>
<li role="presentation">
<a href="#<?php echo $sup_term->slug; ?>" aria-controls="<?php echo $sup_term->slug; ?>" role="tab" data-toggle="tab"><?php echo $sup_term->name; ?></a>
</li>
<script type="text/javascript">
jQuery(".sup_cats li:first").addClass("active");
</script>
<?php
$sup_c_terms = get_terms("supplier_categoties", array("orderby" => "slug", "parent" => $sup_term->term_id, "hide_empty" => false));
if($sup_c_terms) :
foreach($sup_c_terms as $key => $sup_c_term) :
$tabcontent .='<div role="tabpanel" class="tab-pane" id="'.$sup_term->slug.'">';
$tabcontent .= $sup_c_term->name;
$tabcontent .='</div>';
endforeach;
endif;
endforeach;
?></ul>
<div class="tab-content sup_cats_inner">
<div role="tabpanel" class="tab-pane" id="<?php $sup_term->slug ?>">
<?php echo $tabcontent; ?>
<script type="text/javascript">
jQuery('.sup_cats_inner > :first-child').addClass("active");
</script>
答案 0 :(得分:0)
以下代码会有所帮助。
if 10839 < w < 10850:
if flag == 0:
lcdclear()
lcdprint("Fuel Cell Has Been Replenished")
setCursor(0,1);
lcdprint("Sending Email")
server = smtplib.SMTP('mail.jon2.com', 587)
server.starttls()
server.login("jon2@jon2.com", "aaaa1111")
msg = "Fuel Cell Has Been Replenished"
server.sendmail("jon1@jon2.co.uk", msg)
server.quit()