smichaelsen / folder-cobj
TypoScript Content Object to load system folders
Installs: 41 335
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 3
Open Issues: 1
Type:typo3-cms-extension
Requires
- typo3/cms-core: ^9.5 || ^10.4 || ^11.5
This package is auto-updated.
Last update: 2024-11-25 08:06:34 UTC
README
The Problem
Existing TYPO3 TypoScript Content Objects make it hard to load sysfolders:
- The
CONTENT
cObj is restricted to not load pages with doktype 200 and above (sysfolders have 254). - If you want to use the
RECORDS
cObj you need to know the uid of the sysfolder.
The Solution
This extension introduces a new TypoScript cObj called FOLDER
.
Example to load one folder uid:
lib.footerNavigationPid = FOLDER
lib.footerNavigationPid {
containsModule = tx_myext_footernavigation
restrictToRootPage = 1
renderObj = TEXT
renderObj.field = uid
limit = 1
}
This will load the uid of the folders that has tx_myext_footernavigation
assigned in the pages.module
(contains module) field - and is on the first level of the current rootline.
Example to load a list of folder uids:
lib.footerNavigationPid = FOLDER
lib.footerNavigationPid {
containsModule = tx_myext_footernavigation
renderObj = TEXT
renderObj.field = uid
renderObj.wrap = |,
stdWrap.substring = 0,-1
}
This will load the uids of all folders that have tx_myext_footernavigation
assigned in the pages.module
(contains module) field. The last trailing comma is removed by stdWrap.substring = 0,-1
.