Last active
May 23, 2022 17:16
-
-
Save froemken/af945ea2a3a8dfaaa6089666bf44e581 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.contentObjectExceptionHandler = 0 | |
# Default PAGE object: | |
page = PAGE | |
page.10 = FLUIDTEMPLATE | |
page.10.file = fileadmin/template.html | |
page.10 { | |
dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor | |
dataProcessing.10 { | |
table = pages | |
pidInList = 1 | |
as = subPages | |
orderBy = pages.sorting | |
dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor | |
dataProcessing.10 { | |
references.fieldName = media | |
} | |
dataProcessing.20 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor | |
dataProcessing.20 { | |
table = tt_content | |
as = inhalte | |
pidInList.field = uid | |
} | |
} | |
dataProcessing.20 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor | |
dataProcessing.20 { | |
#special = directory | |
#special.value = <parent page uid> | |
levels = 2 | |
as = mainMenu | |
dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor | |
dataProcessing.10 { | |
references.fieldName = media | |
} | |
} | |
} | |
HTML: | |
<f:debug>{_all}</f:debug> | |
<ul> | |
<f:for each="{subPages}" as="page"> | |
<li> | |
<f:for each="{page.files}" as="file"> | |
<f:image image="{file}" width="320" height="280" /> | |
</f:for> | |
<f:link.page pageUid="{page.data.uid}">{page.data.title}</f:link.page> | |
</li> | |
</f:for> | |
</ul> |
Author
froemken
commented
Aug 13, 2020
via email
Please work with Session Backend instead:
GeneralUtility::makeInstance(SessionManager::class)->getSessionBackend($loginType)
Your way will show all logged-in users, yes, but what, if a session has
expired? In your case the user is still visible. So it's better to use the
real user sessions.
Use Method getAll() to get all Sessions and then use user_uid to collect
the fe_user records.
$loginType would be FE for FrontEnd
Nice greetings from germany
Stefan
Am Do., 13. Aug. 2020 um 15:04 Uhr schrieb midun mano <
[email protected]>:
… ***@***.**** commented on this gist.
------------------------------
10 = FLUIDTEMPLATE
10 {
file = ext:spkg/Resources/Private/Partials/Page/DropIn/Navigation/MainBefore.html
}
##########################
### DATA PREPROCESSING ###
##########################
10.dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
10 {
table = fe_users
as = userarrays
}
}
<ul>
<f:for each="{userarrays}" as="userarray">
<li>{userarray.data.username}</li>
</f:for>
</ul>
I just want to fetch currently logged-in user and pass the data into my
fluid file MainBefore.html. My approach is wrong I think. Kindly correct me.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/af945ea2a3a8dfaaa6089666bf44e581#gistcomment-3416207>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATKI6GOKAAICKIRAETRLHTSAPQFHANCNFSM4P6MG6EA>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment