[TYPO3] Adding page content dynamically

Dmitry Dulepov typo3 at accio.lv
Wed Sep 13 07:33:16 CEST 2006


Hi!

Tomas Mrozek wrote:
> My aim:
> ------
> I need to add content from another page according to certain conditions.
> 
> The conditions:
> --------------
> If GET variable named 'myVariable' is set, look up the 'myTable' and
> find page uid in 'myColumn'. Then add content from the page with uid
> that you found.
> 
> 
> Approach:
> --------
> I tried to play with TS conditions and CONTENT cObject:
> 
> [globalVar = GP:myVariable > 0]
>   subparts.MARKER = CONTENT
>   subparts.MARKER.table = tx_myTable
>   ....
> [global]
> 
> ....but I think I am on a completely wrong track.

Nope. Use andWhere in select. It is stdWrap, so you can do almost 
anything with it. Use it to fetch pid from your field and construct 
where statement.

> Is it possible to do that with TS only?

Certainly.

> Is it possible to do it with help of my own PHP code?

Yes and it may be faster than with TS when page is rendered first time 
(no difference when it is cached). But if you use TS only you will have 
all in one place. I would go TS way.

-- 
Dmitry Dulepov
http://typo3bloke.net/

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)



More information about the TYPO3-english mailing list