Skip to content

Commit

Permalink
[FEATURE] Demonstrate footer menu in site package tutorial package (#481
Browse files Browse the repository at this point in the history
)
  • Loading branch information
linawolf authored Jan 22, 2025
1 parent 6daf914 commit 07d21da
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
page {
10 {
dataProcessing {
40 = menu
40 {
as = footerMenu
special = directory
special.value = {${{ package.packageName }}.footerMenuRoot}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ categories:
{{ package.packageName }}.layout:
label: 'Layout'
parent: {{ package.packageName }}
{{ package.packageName }}.menus:
label: 'Menus'
parent: {{ package.packageName }}

settings:
{{ package.packageName }}.template_path:
Expand Down Expand Up @@ -36,3 +39,10 @@ settings:
category: {{ package.packageName }}.layout
type: string
default: 'EXT:{{ package.extensionKey }}/Resources/Public/Icons/favicon.ico'

{{ package.packageName }}.footerMenuRoot:
label: 'Footer menu root uid'
description: 'The subpages of this page are displayed in the footer'
category: {{ package.packageName }}.menus
type: int
default: 2
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<ul class="nav col-md-4 justify-content-end">
<li class="nav-item"><a href="#" class="nav-link px-2 text-body-secondary">Data privacy</a></li>
<li class="nav-item"><a href="#" class="nav-link px-2 text-body-secondary">Imprint</a></li>
</ul>
<f:if condition="{footerMenu}">
<ul class="nav col-md-4 justify-content-end">
<f:for each="{footerMenu}" as="menuItem">
<li class="nav-item"><a href="{menuItem.link}" class="nav-link px-2 text-body-secondary">{menuItem.title}</a></li>
</f:for>
</ul>
</f:if>

0 comments on commit 07d21da

Please sign in to comment.