[TYPO3-english] advanced typoscript wrapping needed

bernd wilke x00nsji02 at sneakemail.com
Wed Apr 22 21:14:06 CEST 2009


Am Wed, 22 Apr 2009 18:30:42 +0200 schrieb Walrick:

> To make this thread complete for other people who may need this.
> 
> I have added and edited my TS a bit more to make it possible to create
> containers around the content depending on the access status.

the typoscript-if is something I avoided yet. And so you got a working 
solution: congratulations. 
 
> Combined with come css styling the following puts a red box around all
> the content is the entire page is members-only, and a yellow box if the
> entire page is CT-only (a kind of management team). It also adds some
> text above the boxes.
> 
> If the page is public but contains members-only or CT-only content the
> individual content element gets the border and the text above it.
> 
> If the page is members-only but contains CT-only elements. The entire
> content gets a red border and the ct element a yellow one.
> 
> Note that the div container around the whole thing is closed in my html
> template. So the final </div> is missing in this code. The texts have
> yet to be replaced by constants to allow for translation.

this is a bad drawback as it needs managing in two different areas to 
work completely.

Looking at your TS i found a lot of unbalanced wrappings.
Normaly you can nest elements so the wrapping is done in a propper way 
having opening and closing tag in the same wrap .
I think it can all be done with correct wrapping instead of having tags 
in typoscript-HTML-elements or unbalanced wraps. 
Inserting half tags in TEXT could be a bad idea, as it may be wrapped 
with other tags like '<p>', which will break nesting / syntax.

What you need is an typoscript expert like JoH :-)

at the end it might be a nice solution which can be used often.

 
bernd
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html


More information about the TYPO3-english mailing list