build(docs-infra): include directives etc in class descendants lists (#25768)
PR Close #25768
This commit is contained in:

committed by
Alex Rickabaugh

parent
ce06a75ebf
commit
15dadb92ef
@ -1,22 +1,22 @@
|
||||
{% macro renderDescendantList(descendants, docType, recursed) %}
|
||||
{% macro renderDescendantList(descendants, descendantType, recursed, docTypeMatcher) %}
|
||||
{% if descendants.length %}
|
||||
<ul>
|
||||
{% for descendant in descendants %}
|
||||
<li>
|
||||
<code>{$ descendant.name $}</code>
|
||||
{$ renderDescendantList(descendant.descendants | filterByPropertyValue('docType', docType), docType, recursed) $}
|
||||
{$ renderDescendantList(descendant.descendants | filterByPropertyValue('docType', docTypeMatcher), docType, recursed, docTypeMatcher) $}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endmacro -%}
|
||||
|
||||
{%- macro renderDescendants(doc, docType, title='', recursed=true) %}
|
||||
{% set descendants = doc.descendants | filterByPropertyValue('docType', docType) %}
|
||||
{%- macro renderDescendants(doc, descendantType, title='', recursed=true, docTypeMatcher=descendantType) %}
|
||||
{% set descendants = doc.descendants | filterByPropertyValue('docType', docTypeMatcher) %}
|
||||
{% if descendants.length %}
|
||||
<div class="descendants {$ docType $}">
|
||||
<div class="descendants {$ descendantType $}">
|
||||
{% if title %}<h2>{$ title $}</h2>{% endif %}
|
||||
{$ renderDescendantList(descendants, docType, recursed) $}
|
||||
{$ renderDescendantList(descendants, descendantType, recursed, docTypeMatcher) $}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
Reference in New Issue
Block a user