[TYPO3] How do I reference a particular content element in TS?
Helge Vad
helge at mereteland.dk
Sat Nov 4 11:13:38 CET 2006
> I want to set a single content element as hidden based on a condition. How
> do I hide it it in TypoScript?
Probably several ways to do this - and it depends how your content element in the first place is put on your page.
Typically, something like:
page.10.subparts.CONTENTS< styles.content.get
defines the content for the normal column.
'styles.content.get' translates to a CONTENT element:
select{
table=tt_content
where= colPos=0
orderBy=sorting
..
}
In order to _not_ have content element uid=1411 shown, you might just change this select statement to
where= colPos=0 AND uid<>1411
that is, add this TS line to the template for the given page :
page.10.subparts.CONTENTS.select.where = colPos=0 AND uid<>1411
(of course you need to use something else for the 'page.10.marks.CONTENTS' part - depending on how your page TS template is set up,
perhaps by using the template tools 'Typoscript Object Browser' and 'Template Analyzer' )
Best Helge Vad
More information about the TYPO3-english
mailing list