Normally in typo3 each page displays it’s own content added from the backend.
We can also access contents from other pages via typoscript.
For example if we want to show ‘content’ in colPos = 0 (column position corresponds to this ‘content’ element in backend layout) from page id 3 in page id 2.
Add the following typoscript in template setup,
lib.content_from_page3 = COA
10 = CONTENT
table = tt_content
select.where = colPos = 0
select.pidInList = 3
The above code selects data from tt_content table where column position is zero and page id is 3.
select.where = colPos = o – means we need to get data from column position 0.
select.pidInList = 3 – means page id from which we need to get data.
Get page id from here,
Insert the following code into the template where we want to show this ‘content’ (in this example within page id 2’s template – the template corresponds to page id 2’s backend layout).
<f:cObject typoscriptObjectPath="lib.content_from_page3" />
Now this content will be shown in page id 2.