Last active
August 29, 2015 14:26
-
-
Save moe2k/0f1abfb764ab9a668c88 to your computer and use it in GitHub Desktop.
Get sys_category UIDs for current page
This file contains 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
<f:cObject typoscriptObjectPath="lib.newsList" data="{f:cObject(typoscriptObjectPath:'lib.categoryUid', data:'{page}')}"/> |
This file contains 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
lib.categoryUid = CONTENT | |
lib.categoryUid { | |
table = sys_category | |
select { | |
pidInList = [PID WHERE SYS_CATEGORIES ARE STORED] | |
selectFields = sys_category.uid as catUid | |
join = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid | |
where = sys_category_record_mm.tablenames = 'pages' AND sys_category_record_mm.uid_foreign = {field: uid} | |
where.insertData = 1 | |
#orderBy = sys_category_record_mm.sorting_foreign | |
languageField = sys_category.sys_language_uid | |
} | |
renderObj = TEXT | |
renderObj { | |
field = catUid | |
wrap = |, | |
} | |
} | |
lib.newsList = USER | |
lib.newsList { | |
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run | |
pluginName = Pi1 | |
extensionName = News | |
controller = News | |
action = List | |
settings =< plugin.tx_news.settings | |
persistence =< plugin.tx_news.persistence | |
view =< plugin.tx_news.view | |
switchableControllerActions.News.1 = list | |
settings { | |
useStdWrap = categories | |
categories.stdWrap.cObject = TEXT | |
categories.stdWrap.cObject.current = 1 | |
categoryConjunction = or | |
includeSubCategories = 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment