[TYPO3] Limit type by column

Christopher Torgalson bedlamhotel at gmail.com
Wed Nov 29 18:44:51 CET 2006


Hi Lucas and Tapio,

On 11/29/06, Lucas Birk <tlist at birkit.com> wrote:
> Tapio Markula wrote:
> > Lucas Birk kirjoitti:
> >
> >> Hi all,
> >> I would like to restrict the types of and number of elements that can be
> >> added to a page depending on the column.
> >> Pseudo TS:
> >> TCEFORM.tt_content.CType.colPos_list.0.items = rte
> >> TCEFORM.tt_content.CType.colPos_list.1{
> >> items = image
> >> limit = 1
> >> }
> >> Can this be done with pageTS or would I have to make an ext?
> >> Thanks,
> >> Lucas.
> >>
> >>
> >
> > That has been asked also from me both for the standard page module and
> > TemplaVoila. I don't have a good solution but If you have solution,
> > I could add it to tm_contentaccess.
> > _______________________________________________
> > TYPO3-english mailing list
> > TYPO3-english at lists.netfielders.de
> > http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> >
> >
> >
> >
> Unfortunately I do not yet have a solution. Seems strange this
> functionality is not part of TYPO3.


It's not an ideal solution, but what might be able to do is use
Typoscript's 'if' function in CSS Styled Content's big tt_content CASE
cObject to exclude content items from being /rendered/ in particular
'columns' or regions. For example, if you wanted the IMAGE content
element (which is a COA) type not to be rendered in colPos 2, you
could add this to your main TS template:

tt_content.image.if {
  value = 2
  equals.data = field:colPos
  negate = 1
}

Admittedly, this a) is not very flexible, b) won't work with TV, and
c) would be better done in TSconfig. However, if you really need this
capability, you should be able to get some version of it running out
of the box.


-- 
Christopher Torgalson


More information about the TYPO3-english mailing list