Add August-September activity summary article
Add English translations for categories and tags Add Norwegian translations for categories and tags Add page template for displaying metadata Add news section to navigation menu
This commit is contained in:
parent
466c297fe4
commit
b0ad85f1ac
6 changed files with 69 additions and 0 deletions
25
custom/templates/page.php
Normal file
25
custom/templates/page.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?= $content ?>
|
||||
|
||||
<?php if ($pageMetadata && (isset($pageMetadata['tags']) || isset($pageMetadata['categories']))): ?>
|
||||
<aside class="metadata">
|
||||
<?php if (!empty($pageMetadata['categories'])): ?>
|
||||
<div class="categories">
|
||||
<strong><?= htmlspecialchars($translations['categories'] ?? 'Categories') ?>:</strong>
|
||||
<?php
|
||||
$categories = array_map('trim', explode(',', $pageMetadata['categories']));
|
||||
echo implode(', ', array_map('htmlspecialchars', $categories));
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($pageMetadata['tags'])): ?>
|
||||
<div class="tags">
|
||||
<strong><?= htmlspecialchars($translations['tags'] ?? 'Tags') ?>:</strong>
|
||||
<?php
|
||||
$tags = array_map('trim', explode(',', $pageMetadata['tags']));
|
||||
echo implode(', ', array_map('htmlspecialchars', $tags));
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue