Subcategories not contained withing parent category group
jtsnow - August 5, 2009 - 16:32
| Project: | Frequently Asked Questions |
| Version: | 6.x-1.8 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
The faq-category-hide-answer.tpl.php template indents questions that belong to child categories, but it does not group them in the <div class="faq-category-group"> div of their parent. This makes it impossible to perform simple theme tasks the FAQ output with CSS, such as placing a bottom border beneath top-level categories and their children.
For example, this is what the template produces (irrelevant content removed for brevity):
<div class="faq">
<!-- TOP LEVEL GROUP -->
<div class="faq-category-group"> <!-- Bottom border on this element will not enclose sub-categories -->
<div class="faq-qa-header">
<h5 class="faq-header"> Top-Level Category </h5>
</div>
<div class="faq-qa">
<div class="faq-dl-hide-answer">
<div class="faq-question faq-dt-hide-answer">
</div>
<div class="faq-answer faq-dd-hide-answer" style="display: none;">
</div>
</div>
</div>
</div>
<!-- END OF TOP LEVEL GROUP -->
<!-- SUB-CATEGORY GROUP -->
<div class="faq-category-indent">
<div class="faq-category-group">
<div class="faq-qa-header">
<h6 class="faq-header"> Sub-Category </h6>
</div>
<div class="faq-qa">
<div class="faq-dl-hide-answer">
<div class="faq-question faq-dt-hide-answer">
</div>
<div class="faq-answer faq-dd-hide-answer" style="display: none;">
</div>
</div>
</div>
</div>
</div>
<!-- END OF SUB-CATEGORY GROUP -->
</div>But this is what one would expect:
<div class="faq">
<!-- TOP-LEVEL GROUP -->
<div class="faq-category-group"> <!-- Bottom border on this element would enclose sub-categories -->
<div class="faq-qa-header">
<h5 class="faq-header"> Top-Level Category </h5>
</div>
<div class="faq-qa">
<div class="faq-dl-hide-answer">
<div class="faq-question faq-dt-hide-answer">
</div>
<div class="faq-answer faq-dd-hide-answer" style="display: none;">
</div>
</div>
</div>
<!-- SUB-CATEGORY GROUP -->
<div class="faq-category-indent">
<div class="faq-category-group">
<div class="faq-qa-header">
<h6 class="faq-header"> Sub-Category </h6>
</div>
<div class="faq-qa">
<div class="faq-dl-hide-answer">
<div class="faq-question faq-dt-hide-answer">
</div>
<div class="faq-answer faq-dd-hide-answer" style="display: none;">
</div>
</div>
</div>
</div>
</div>
<!-- END OF SUB-CATEGORY GROUP -->
</div>
<!-- END OF TOP-LEVEL GROUP -->
</div>
#1
I think this may have been done already in the dev version. Can you check and confirm? If it's still an issue, please create a patch file for the change (http://drupal.org/patch/create).
#2
Marking as won't fix as no more information forthcoming. Also a new version of faq released today: 6.x-1.9.