hi there,
i like your plugin very much and so i chose it for my bootstrap getsimple website.
since i have a long list of links, i chose to use the bootstrap accordion which. by applying this, i hoped to show only the category titles first and on click show the link list belonging to the respective category.
the only trouble is that my accordion is not collapsed at first - all links show in a veeeery long list. i am able to toggle all categories, but this is just the wrong way 'round. does anybody have a clue what i could do to make the accordion work the correct way?
this is the customized code snippet from the functions.php:
i am curious what you will advice me - thanks in advance!
i like your plugin very much and so i chose it for my bootstrap getsimple website.
since i have a long list of links, i chose to use the bootstrap accordion which. by applying this, i hoped to show only the category titles first and on click show the link list belonging to the respective category.
the only trouble is that my accordion is not collapsed at first - all links show in a veeeery long list. i am able to toggle all categories, but this is just the wrong way 'round. does anybody have a clue what i could do to make the accordion work the correct way?
this is the customized code snippet from the functions.php:
PHP Code:
if (!empty($links)) {
foreach ($links as $id=>$link) {
$c = catIdx($link['cid']);
if ($cid !== $c) {
$cid = $c;
$html .= "</ul>
<ul>
<div class=\"panel panel-default\">
<div class=\"panel-heading\" role=\"tab\" id=\"überschrift" . $cats[$cid]['name'] . "\">
<h2 class=\"panel-title\">
<a role=\"button\" data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#collapse" . $cats[$cid]['name'] . "\" aria-expanded=\"true\" aria-controls\"collapse" . $cats[$cid]['name'] . "\">
" . (empty($cats[$cid][$n]) ? $cats[$cid]['name'] : $cats[$cid][$n]) . "
</a>
</h2>
</div>
<div id=\"collapse" . $cats[$cid]['name'] . "\" class=\"panel-collapse collapse in\" role=\"tabpanel\" aria-labelledby=\"überschrift" . $cats[$cid]['name'] . "\">
<div class=\"panel-body\">";
}
$html .= "<li><a href=\"${link['url']}\" target=\"_blank\" rel=\"nofollow\">" . (empty($link[$n]) ? $link['name'] : $link[$n]) ."</a>";
if (!empty($link[$d]) || !empty($link['description'])) {
$html .= ' — ' . (empty($link[$d]) ? $link['description'] : $link[$d]);
}
$html .= "</li>";
}
$html = "<div class=\"panel-group\" id=\"accordion\" role=\"tablist\" aria-multiselectable=\"true\">" . $html . "</div>
</div>
</div>
</div>";
}
return $html;
}
i am curious what you will advice me - thanks in advance!