[TYPO3] [solved] Re: communication between TS objects in different FCE fields
Amiran Chyb
amiran.chyb at stopspam.gmail.com
Sat Mar 4 22:49:29 CET 2006
> 10 = TEXT
> 10.value= comments number:
> 20 = TEXT
> 20.numRows {
> table = yourCommentTableName
> select {
> pidInList = PIDofWhereeverThoseRecordsAreStored
> andWhere.dataWrap = pageid={field:field_link}
> }
> }
Bernhard, thank you for such an extensive answer!
Your solution is very elegant, unfortunately typoscript 'select'
construction seems to have a flaw which makes it useless for my problem.
Namely, I cannot set pidInList field to 'all', if I just ommit it it will
default to 'this' value.
Meanwhile, in sk_pagecomments ext, the PID field isn't important at all,
since it only point's to the comments storage folder. So regardless of PID
value, only pageid field says to which page given comment belongs.
I know I could set up some general storage folder for all comments (and
set pidInList to it's UID), or just always store comments on the page on
which they appear (and set pidInList to 'this'), but why bother and risk
false (lowered) query results in case of different record placement?
So for the time being I switched back to my custom php function which
executes the right select query:
10 = TEXT
10.value= Comments:
11 = USER_INT
11.userFunc = user_count_comments_class->count
11.pageid = TEXT
11.pageid.field = field_link
from inside of PHP class, the $conf['pageid'] would return 'TEXT' value,
so I had to process it with stdwrap:
$pageid_processed = $this->cObj->stdWrap($conf['pageid'],$conf['pageid.']);
and $pageid_processed now returns proper ID, so it can be used in SELECT
query.
Nevertheless, if there's a way to ommit pidInList condition, I'd be happy
to hear about it.
cheers
Amiran
More information about the TYPO3-english
mailing list