Commit 3f2a1494 authored by Benni Mack's avatar Benni Mack
Browse files

Merge branch 'T3DEMO-299' into 'main'

[TASK] Link to startpage on logout for restricted pages

See merge request !34
parents b2c21962 adf271b6
Pipeline #10271 passed with stages
in 10 minutes and 11 seconds
...@@ -45,4 +45,14 @@ lib.fluidPage { ...@@ -45,4 +45,14 @@ lib.fluidPage {
[frontend.user.isLoggedIn] [frontend.user.isLoggedIn]
lib.fluidPage.settings.userIsLoggedIn = true 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] [end]
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<f:render section="DropIn/Before" optional="true" /> <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> <main>
<f:render section="Stage" optional="true"> <f:render section="Stage" optional="true">
......
...@@ -98,11 +98,20 @@ ...@@ -98,11 +98,20 @@
<div class="b_header__login"> <div class="b_header__login">
<f:if condition="{settings.userIsLoggedIn}"> <f:if condition="{settings.userIsLoggedIn}">
<f:then>
<f:if condition="!{currentpage.0.data.fe_group}">
<f:then> <f:then>
<f:link.page additionalParams="{logintype: 'logout'}" class="b_button b_button--secondary umami--click--button-frontend-logout"> <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:translate key="login.logout" extensionName="site_t3demo" />
</f:link.page> </f:link.page>
</f:then> </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:else>
<f:link.typolink parameter="{settings.login}" class="b_button umami--click--button-frontend-login"> <f:link.typolink parameter="{settings.login}" class="b_button umami--click--button-frontend-login">
<f:translate key="login.login" extensionName="site_t3demo" /> <f:translate key="login.login" extensionName="site_t3demo" />
......
Supports Markdown
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