[TYPO3-dev] TCA and dynamic values based TS or TSconfig

Tomi Hrovatin tomi at tri-ex.si
Fri Mar 16 13:58:20 CET 2007


Hi!
Looked everywere, found nothing usefull. :(

So what I'd like to do is:
I'm using tt_news and sg_newsplus extensions.
in sg_newsplus i have different upload paths for news items (defined in 
TS for different page tree branches).
in tt_news the upload path is set in TCA and thus fixed.

In FE I use both extensions for displaying tt_news records.

The problem is:
sg_newsplus stores uploaded files in /fileadmin/intra/one
tt_news stores uploaded files to TCA predefined folder (uploads/tt_news)

If I want to see a news item with tt_news plugin that was created with 
sg_newsplus, the files do not show. (becouse they are in different 
dirs). And the same thing happens if I create news item in BE and want 
to display it with sg_newsplus.

Here are some possible solutions I see:
- dinamicaly change the upload folder in TCA of tt_news - based on TS 
set for sg_newsplus. (I can't access TS in TCA)
- dinamicaly change the upload folder in TCA of tt_news - based on page 
TSconfig; That is possible, but I still have problems accessing page ID 
in a form of tt_news (the page ID is not passed in querystring but 
inside returnUrl parameter and I have to parse it). And if decide to use 
this approach I'd like to use page TSconfig setting in TS as well, so I 
don't have same setting in two different places)

And the questions:
- is it possible to access TS in TCA.php and how?
- is it possible to access page TSconfig inside TS and how?
- is there some more elegant approach to this problem?

And just another question on TCA.php and $BE_USER: How come that 
$BE_USER object is not initialized in TCA.php? I saw some example in cal 
extension where they access $BE_USER in TCA but in my case the object is 
not initialized.

thnx in advance,

-- 
Tomi Hrovatin
-----------------------
Tri-ex d.o.o.
www.tri-ex.si
www.iPlantCare.com
www.flowerServant.com
www.indoor-plant-care.com
-----------------------




More information about the TYPO3-dev mailing list