Bug #44961
closedCategorization in core is not usable in frontend
100%
Description
Besides the common use case to be able to categorize records, it should also be possible to render the categories of a record in frontend.
The basic API in TYPO3 for this use case is the CONTENT object in TypoScript. ("This object is designed to generate content by making it possible to finely select records and rendering them.")
But naming the category table sys_category this is not possible, because a prefix sys_ is not allowed for CONTENT.
e.g. the following would not work to render the categories of pages
page.20 = CONTENT page.20 { table = sys_category select { pidInList = XYZ join = sys_category_record_mm ON sys_category.uid = sys_category_record_mm.uid_local where = tablenames = 'pages' andWhere = sys_category_record_mm.uid_foreign = {TSFE:page|uid} andWhere.insertData = 1 } renderObj = COA renderObj { 10 = TEXT 10.field = title 10.wrap = |, } }
Having a userFunc in core for this is IMO not the right way.
Using a query to pages with a join is also only a annoying workaround.
Updated by Marc Bastian Heinrichs almost 12 years ago
If anybody needs the workaround:
page.20 = CONTENT page.20 { table = pages select { uidInList = this pidInList = 0 selectFields = sys_category.* join = sys_category_record_mm ON pages.uid = sys_category_record_mm.uid_foreign JOIN sys_category ON sys_category.uid = sys_category_record_mm.uid_local where = sys_category_record_mm.tablenames = 'pages' AND sys_category.pid = XYZ } renderObj = COA renderObj { 10 = TEXT 10.field = title 10.wrap = |, } }
Updated by Ingo Renner almost 12 years ago
I think an exception (whitelist) for sys_category would be ok.
Updated by Marc Bastian Heinrichs about 11 years ago
- Target version set to 6.2.0
- Is Regression set to No
Solutions:
a) whitelist sys_category
b) rename table sys_category (with migration wizard)
c) remove the check for "pages,tt,fe,tx,ttx,user,static" complete - following core tables could be rendered then:
- backend_layouts
- be_*
- ct_*
- sys_*
- zzz_deleted
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25316
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25316
Updated by Marc Bastian Heinrichs about 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 75c05112bbc64faf69135583c3f607c84ab7f3be.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed