Convert footer menu to main menu
This commit is contained in:
parent
ed2f6b2bc4
commit
7eafd33208
10 changed files with 85 additions and 33 deletions
|
@ -11,6 +11,18 @@
|
||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$tableName], [
|
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA'][$tableName], [
|
||||||
'columns' => [
|
'columns' => [
|
||||||
|
'rel' => [
|
||||||
|
'label' => 'rel Attribute of generated a Tag',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'url' => [
|
||||||
|
'config' => [
|
||||||
|
'renderType' => 'inputLink',
|
||||||
|
'softref' => 'typolink',
|
||||||
|
],
|
||||||
|
],
|
||||||
'lastUpdated' => [
|
'lastUpdated' => [
|
||||||
'label' => $languagePath . 'lastUpdated',
|
'label' => $languagePath . 'lastUpdated',
|
||||||
'config' => [
|
'config' => [
|
||||||
|
@ -25,4 +37,11 @@
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
|
||||||
|
$tableName,
|
||||||
|
'rel',
|
||||||
|
\TYPO3\CMS\Core\Domain\Repository\PageRepository::DOKTYPE_LINK,
|
||||||
|
'after:url'
|
||||||
|
);
|
||||||
|
|
||||||
})('ds_site', 'pages');
|
})('ds_site', 'pages');
|
||||||
|
|
|
@ -124,7 +124,7 @@ page {
|
||||||
|
|
||||||
1000 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
1000 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||||
1000 {
|
1000 {
|
||||||
as = footerMenu
|
as = mainMenu
|
||||||
special = list
|
special = list
|
||||||
special.value = 3
|
special.value = 3
|
||||||
levels = 2
|
levels = 2
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||||
data-namespace-typo3-fluid="true">
|
data-namespace-typo3-fluid="true">
|
||||||
<footer>
|
<footer>
|
||||||
{f:render(partial: 'FooterMenu', arguments: {pages: footerMenu.0.children})}
|
|
||||||
<p>
|
<p>
|
||||||
Created by Daniel Siepmann between 2016 - {f:format.date(format: 'Y', date: 'now')}, with help of open source.<br>
|
Created by Daniel Siepmann between 2016 - {f:format.date(format: 'Y', date: 'now')}, with help of open source.<br>
|
||||||
Running <a href="https://typo3.org/" title="The TYPO3 Project and Community – Open Source CMS">TYPO3</a>
|
Running <a href="https://typo3.org/" title="The TYPO3 Project and Community – Open Source CMS">TYPO3</a>
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
|
||||||
data-namespace-typo3-fluid="true">
|
|
||||||
<nav>
|
|
||||||
<a rel="alternate" title="RSS Feed of all blog posts" type="application/rss+xml" href="{f:uri.page(pageUid: 1, pageType: 1533906435, additionalParams: {sitemap: 'blog-posts'})}">RSS Feed</a>
|
|
||||||
<a rel="me" href="https://fosstodon.org/@daniels">at Mastodon</a>
|
|
||||||
<a href="https://gitea.daniel-siepmann.de/danielsiepmann">My Gitea</a>
|
|
||||||
<f:for each="{pages}" as="page">
|
|
||||||
<a href="{page.link}">{page.title}</a>
|
|
||||||
</f:for>
|
|
||||||
</nav>
|
|
||||||
</html>
|
|
15
Resources/Private/Partials/Page/MainMenu.html
Normal file
15
Resources/Private/Partials/Page/MainMenu.html
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||||
|
data-namespace-typo3-fluid="true">
|
||||||
|
<nav>
|
||||||
|
<details open>
|
||||||
|
<summary>
|
||||||
|
<h2>Menu</h2>
|
||||||
|
</summary>
|
||||||
|
<ul>
|
||||||
|
<f:for each="{pages}" as="page">
|
||||||
|
<li><a href="{page.link}"{f:if(condition: page.data.rel, then: ' rel="{page.data.rel}"')}>{page.title}</a></li>
|
||||||
|
</f:for>
|
||||||
|
</ul>
|
||||||
|
</details>
|
||||||
|
</nav>
|
||||||
|
</html>
|
|
@ -30,6 +30,11 @@ body > main {
|
||||||
|
|
||||||
& article > aside {
|
& article > aside {
|
||||||
margin-bottom: $spacer * 2;
|
margin-bottom: $spacer * 2;
|
||||||
|
|
||||||
|
nav ul {
|
||||||
|
list-style: none;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,20 +97,23 @@ nav {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1439px) {
|
@media (max-width: 1439px) {
|
||||||
body > main > aside {
|
body > main {
|
||||||
padding-bottom: 0;
|
& aside {
|
||||||
|
padding-bottom: 0;
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
& aside,
|
||||||
li {
|
& article > aside {
|
||||||
margin-right: $spacer;
|
li {
|
||||||
line-height: $spacer * 2;
|
margin-right: $spacer;
|
||||||
}
|
line-height: $spacer * 2;
|
||||||
|
}
|
||||||
nav ul {
|
nav ul {
|
||||||
columns: 4;
|
columns: 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,14 +127,13 @@ nav {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
body > main > aside {
|
body > main {
|
||||||
nav {
|
& article aside,
|
||||||
ul {
|
& aside {
|
||||||
columns: 2;
|
nav {
|
||||||
}
|
ul {
|
||||||
|
columns: 2;
|
||||||
li {
|
}
|
||||||
display: block;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,17 @@
|
||||||
</f:section>
|
</f:section>
|
||||||
|
|
||||||
<f:section name="Aside">
|
<f:section name="Aside">
|
||||||
|
|
||||||
|
{f:render(section: 'TableOfContent', arguments: {
|
||||||
|
pageContent: pageContent
|
||||||
|
})}
|
||||||
|
|
||||||
|
{f:render(partial: 'MainMenu', arguments: {
|
||||||
|
pages: mainMenu.0.children
|
||||||
|
})}
|
||||||
|
</f:section>
|
||||||
|
|
||||||
|
<f:section name="TableOfContent">
|
||||||
<nav>
|
<nav>
|
||||||
<details open>
|
<details open>
|
||||||
<summary>
|
<summary>
|
||||||
|
|
|
@ -23,5 +23,9 @@
|
||||||
topics: allTopics
|
topics: allTopics
|
||||||
})}
|
})}
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
{f:render(partial: 'MainMenu', arguments: {
|
||||||
|
pages: mainMenu.0.children
|
||||||
|
})}
|
||||||
</f:section>
|
</f:section>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
pageContent: pageContent
|
pageContent: pageContent
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
{f:render(partial: 'MainMenu', arguments: {
|
||||||
|
pages: mainMenu.0.children
|
||||||
|
})}
|
||||||
|
|
||||||
</f:section>
|
</f:section>
|
||||||
|
|
||||||
<f:section name="Breadcrumb">
|
<f:section name="Breadcrumb">
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
CREATE TABLE pages (
|
||||||
|
rel varchar(2048),
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE sys_category (
|
CREATE TABLE sys_category (
|
||||||
slug varchar(2048),
|
slug varchar(2048),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue