Feature #17299
closedEnable/integrate conditions in Page TSconfig
0%
Description
doc_core_tsconfig tells us "The syntax is as usual TypoScript, only difference is that you cannot use any Constants or Conditions."
In some situations conditions make also sense for the TYPO3 page. Imagine you'd like to set TSconfig for sub-pages of the current one. There is currently no "next Level" functionality in the backend like it is in templates for the frontend.
t3lib_matchcondition has to be extended to work also in backend - maybe some conditions cannot be ported from frontend to backend at all.
Imagine the following page strucutre:
1
|-- 2
|-- 3
With the following Page TSconfig, only the pages 2 and 3 are affected:
[PIDupinRootline=1]
mod.SHARED.colPos_list=0
[end]
(issue imported from #M5613)
Files
Updated by Oliver Hader over 17 years ago
userFunc is currently disabled in BE
This could be extended to use t3lib_div::callUserFunction (also for FE) - thus it's not required anymore (but allowed) to have the user function globally.
Updated by Oliver Hader over 17 years ago
userFunc was enabled again, but not with t3lib_div::callUserFunction - there are some more changes needed (if it makes sense at all) and would go to a new feature request.
Updated by Oliver Hader over 17 years ago
I had a bug in t3lib_matchCondition::getPageId and fixed it with the new file 0005613_v4.patch.
Updated by Oliver Hader over 17 years ago
- PIDupinRootline didn't work when creating a new page and the parent page was the one set in PIDupinRootline
- disabled caching of TSconfig if conditions were found
Updated by Oliver Hader over 17 years ago
- on saving a new page record during the TCEmain phase the PIDupinRootline was processed wrong if the parent page of the new one was set there (thanks to Carsten Lausen for pointing this out)
Updated by Oliver Hader over 17 years ago
- if a new page is created after another one (uid negative, e.g. "-333") this wasn't resolved correctly
Updated by Benni Mack almost 17 years ago
Somebody needs to submit it to the core list, I haven't seen it in my latest trunk.
Updated by Oliver Hader almost 17 years ago
Oh, it is already in the Core List. Bernhard just used a misleading subject:
"RFC: Hook request for t3lib_befunc + t3lib_userauthgroup" (2007-11-16)
Updated by Helmut Hummel over 16 years ago
I added a patch agains current revison 3600 (4_2 branch)
It works for my so far, but I could not resolv the remaining issues Olly mentioned in core List:
--------------
1) t3lib_TSparser_TSconfig
Why are you looking for $TSFE->sys_page? The hash-string stays the same
if deliverd to t3lib_pageSelect ($TSFE->sys_page) or to t3lib_BEfunc.
IMO we could replace the stuff in t3lib_TSparser_TSconfig::getHash() by:
if (TYPO3_MODE=='BE' || isset($GLOBALS['TSFE']) &&
is_object($GLOBALS['TSFE']) && $GLOBALS['TSFE']->beUserLogin) {
return t3lib_BEfunc::getHash($hash, $expTime);
}
Can't we?
2) We have to encapsulate the new functions (private, protected, ...)
3) In t3lib_matchCondition::evalPageId() I found a bug:
'new': the id delivered might be negative (new record after existing)
In t3lib_matchCondition::evalConditionStr(), case 'treeLevel':
This should be extended for the case a new page is generated which would
increment the treeLevel by 1.
--------------
Perhaps someone can do this and update the patch. This will be a great feature for 4.3
Updated by Oliver Hader over 15 years ago
Benni, thanks for adding an updated version of the patch! :)
Updated by Benni Mack over 15 years ago
Sure, however, I don't like adding this new "hybrid" class. I would much rather have a new class named "t3lib_febefunc" class that includes a lot of common functions used for FE and BE, "hybrid" just doesn't tell what's in the class. "febefunc" I don't like so much either, better ideas?
Updated by Oliver Hader over 15 years ago
Attached a "work-in-progress" version as v13 - it's not finished...
Split up matchCondition to a backend and frontend class.
Updated patch to apply with Trunk again.
More to come...
Updated by Oliver Hader about 15 years ago
Updated by Oliver Hader about 15 years ago
Committed to SVN Trunk (rev. 6188)
Committed tests to SVN Trunk (rev. 6189)