Commit adf271b6 authored by David Steeb's avatar David Steeb
Browse files

[TASK] Link to startpage on logout for restricted pages

Related: T3DEMO-299
parent 4ec76d9d
Pipeline #10266 passed with stage
in 2 minutes and 28 seconds
......@@ -45,4 +45,14 @@ lib.fluidPage {
[frontend.user.isLoggedIn]
lib.fluidPage.settings.userIsLoggedIn = true
lib.fluidPage.dataProcessing {
1611147990940 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
1611147990940 {
special = list
special.value.field = uid
levels = 1
as = currentpage
}
}
[end]
......@@ -5,7 +5,7 @@
<f:render section="DropIn/Before" optional="true" />
<f:render partial="Header" arguments="{mainMenu: mainMenu, languageMenu: languageMenu, startpage: startpage}" />
<f:render partial="Header" arguments="{mainMenu: mainMenu, languageMenu: languageMenu, startpage: startpage, currentpage: currentpage}" />
<main>
<f:render section="Stage" optional="true">
......
......@@ -99,9 +99,18 @@
<div class="b_header__login">
<f:if condition="{settings.userIsLoggedIn}">
<f:then>
<f:link.page additionalParams="{logintype: 'logout'}" class="b_button b_button--secondary umami--click--button-frontend-logout">
<f:translate key="login.logout" extensionName="site_t3demo" />
</f:link.page>
<f:if condition="!{currentpage.0.data.fe_group}">
<f:then>
<f:link.page additionalParams="{logintype: 'logout'}" class="b_button b_button--secondary umami--click--button-frontend-logout">
<f:translate key="login.logout" extensionName="site_t3demo" />
</f:link.page>
</f:then>
<f:else>
<f:link.page pageUid="{settings.startpage}" additionalParams="{logintype: 'logout'}" class="b_button b_button--secondary umami--click--button-frontend-logout">
<f:translate key="login.logout" extensionName="site_t3demo" />
</f:link.page>
</f:else>
</f:if>
</f:then>
<f:else>
<f:link.typolink parameter="{settings.login}" class="b_button umami--click--button-frontend-login">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment