[Typo3] Using TSconfig to change colPos_list based on page layout

Bernhard Kraft kraftb at kraftb.at
Fri Jun 24 20:06:31 CEST 2005

Joseph Mesterhazy wrote:
> Thanks, this is getting me closer, but what is the equivalent of  
> TSFE:page|layout for the page TSConfig in the backend? I tried  
> variations such as page:layout, etc. with no success. GP:id=xx did  
> work, so the extension is working, but I would like this code to be  
> dynamic so I don't have to keep a list of page ID's that use the  
> alternate templates.

Could you tell my why you need this for ?

If you have two different templates it is not problem to put the contents into the same
Column ... When one template is selected it gets outputted to a specific column and when
the other template gets selected it can get outputted to a different column.

Setting the colPos value by TSConfig (also if just conditional by page layout) will restrict
the user to insert content to just one column.

For the condition to work it is necessary that the page-row is loaded somewhere in memory
when the colPos TSConfig should be set (which is the case when you edit or create a Content
Element). I checked that but unfortunatly the page, on which the content element to edit resided,
isn't loaded. The onyl possibility you have is to write some extension which hooks into TCEMain for
example and loads the page .. then you can make a condition with kb_tsconfig_cond ... but in the
case you make a hook extension you could modify the colPos value directly out of this extension...

but I made many sites and never needed such a feature :)

pherhaps if you explain what you want to achieve we can supply you a better and maybe even simpler solution !


More information about the TYPO3-english mailing list