Изменения документа HRlink. Новости об обновлениях
Редактировал(а) HRlink 22.08.2025
Сводка
-
Свойства страницы (1 изменено, 0 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Содержимое
-
... ... @@ -1,27 +1,15 @@ 1 1 {{velocity}} 2 -#set($full = $doc.fullName) 3 -#if($full.endsWith('.WebHome')) 4 - #set($prefix = $full.substring(0, $full.length() - 8) + '.') 5 -#else 6 - #set($prefix = $full + '.') 2 +#set($query = "select distinct post.category from doc.object(Blog.BlogPostClass) as post order by post.category") 3 +#set($categories = $services.query.xwql($query).execute()) 4 + 5 +<h3>Все категории, используемые в блогах:</h3> 6 +<ul> 7 +#foreach($cat in $categories) 8 + <li><strong>"$cat"</strong></li> 7 7 #end 10 +</ul> 8 8 9 -#set($rows = $services.query.xwql( 10 - "select doc.fullName from Document doc " + 11 - "where doc.fullName like :pref and doc.name <> 'WebHome' " + 12 - "order by doc.date desc" 13 -).bindValue('pref', $prefix + '%').setLimit(50).execute()) 14 - 15 -#if($rows.isEmpty()) 16 - <p>Пока нет публикаций в этой ветке.</p> 17 -#else 18 - #foreach($fn in $rows) 19 - #set($d = $xwiki.getDocument($fn)) 20 - <article style="margin:14px 0; padding-bottom:10px; border-bottom:1px solid #e5e7eb"> 21 - <div style="color:#6b7280; font-size:.9em">$datetool.format('dd MMM yyyy', $d.date)</div> 22 - <h3 style="margin:.2rem 0"><a href="$d.getURL('view')">$escapetool.html($d.displayTitle)</a></h3> 23 - <div>$!d.getPlainContent().substring(0,300)…</div> 24 - </article> 25 - #end 12 +#if($categories.isEmpty()) 13 + <p>Не найдено ни одной категории или нет блог-постов.</p> 26 26 #end 27 27 {{/velocity}}