Шаблон:КатегорияDPL: различия между версиями

Материал из База знаний АО АСП
Перейти к навигации Перейти к поиску
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
<div id="section-header" style="font-weight: bold;">Разделы</div>
<div id="section-header" style="font-weight: bold;">Разделы</div>
<ul id="sections-list">
{{#tag:DynamicPageList|
{{#tag:DynamicPageList|
category={{{1|}}}
category={{{1|}}}
Строка 9: Строка 8:
order=ascending
order=ascending
suppresserrors=true
suppresserrors=true
resultsheader=<div style="font-weight: bold;">Разделы</div>
noresultsheader=
noresultsheader=
}}
}}
</ul>


<div style="font-weight: bold;">Страницы</div>
<div style="font-weight: bold;">Страницы</div>
<ul>
{{#tag:DynamicPageList|
{{#tag:DynamicPageList|
category={{{1|}}}
category={{{1|}}}
Строка 25: Строка 23:
noresultsheader=
noresultsheader=
}}
}}
</ul>
<!-- Подключаем JS -->
<script>
document.addEventListener("DOMContentLoaded", function() {
    var sectionHeader = document.getElementById("section-header");
    var sectionList = document.getElementById("sections-list");
    // Проверяем, есть ли элементы <li> внутри <ul>
    if (sectionList && sectionList.children.length === 0) {
        sectionHeader.style.display = "none";
    }
});
</script>

Версия от 15:51, 6 марта 2025

Разделы


Страницы