[TYPO3-german] [TYPO3-4.5] DIV verbergen

Kevin Gut news at ayra.ch
Thu Feb 24 16:23:14 CET 2011


Das subparts.content_left im codeabschnitt unten besitzt das Attribut 
required nicht, auch habe ich keine Ahnung
auch habe ich keine Ahnung, wie ich ein IF realisieren kann, oder ein 
stdWrap erstelle
ich habe irgendwo eines im Format:
===========
[Bedingung]
#dann
[else]
#sonst
[end]
===========
gesehen, allerdings steht da auch, dass man das innerhalb von 
geschweiften klammern nicht einsetzen kann, allersings habe ich solche 
wie man unterhalb erkennen kann.

# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
    # content from the Auto-parser to the TEMPLATE:
  template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <body>-tags
  workOnSubpart = DOCUMENT_BODY
    # Page Menu
  subparts.menu_1 < temp.menu_1
    # Page Content
  subparts.content < styles.content.get
  subparts.content_right < styles.content.getRight
  subparts.content_left < styles.content.getLeft
}

On 24 Feb 2011, you wrote in typo3.german:

> Hi,
> 
> guck dir mal in der Doku die TSConditions an.
> Da gibts dass Attribut required. Mit stdWrap sollte das dann relativ
> einfach gehen ;)
> 
> Am 24.02.2011 14:38, schrieb Kevin Gut:
>> Hallo
>> Bin neu bei Typo3 und habe das folgende Tutorial mal abgearbeitet:
>> http://goo.gl/a2MXc
>> [...]
>> Das ganze ist also eine einfache Tabelle.
>> Mein Problem ist jetzt, dass der Content Links
>> nicht direkt das TD ist wie die anderen,
>> sondern dass ein eingefärbtes DIV darin ist.
>> Ich möchte, dass das DIV (content_left)
>> nur sichtbar ist, wenn auch ein Inhalt vorhanden ist.
>> Die Tabelle bleibt gleich, nur das DIV soll nicht
>> sichtbar sein, ich habe jedoch keine Ahnung,
>> wie ich das anstellen soll.
>> Wäre froh wenn mir jemand weiterhelfen könnte.
>> 
>> Mein bisheriges Typo Script ist das folgende:
>> ====================================================
>> # Configuring the Auto-Parser:
>> plugin.tx_automaketemplate_pi1 {
>>     # Read the template file:
>>   content = FILE
>>   content.file = fileadmin/template/main/main.html
>>     # Here we define which elements in the HTML that 
>>     # should be wrapped in subpart-comments:
>>   elements {
>>     BODY.all = 1
>>     BODY.all.subpartMarker = DOCUMENT_BODY
>>     HEAD.all = 1
>>     HEAD.all.subpartMarker = DOCUMENT_HEADER
>>     HEAD.rmTagSections = title
>>     TD.all = 1
>>   }
>>     # Prefix all relative paths with this value:
>>   relPathPrefix = fileadmin/template/main/
>> }
>> 
>> # Menu 1 cObject
>> temp.menu_1 = HMENU
>>   # First level menu-object, textual
>> temp.menu_1.1 = TMENU
>> temp.menu_1.1 {
>>     # Normal state properties
>>   NO.allWrap = <div class="menuItem"> | </div>
>>     # Enable active state and set properties:
>>   ACT = 1
>>   ACT.allWrap = <div class="menuItem act"> | </div>
>> }
>>   # Second level menu-object, textual
>> temp.menu_1.2 = TMENU
>> temp.menu_1.2 {
>>     # Normal state properties
>>   NO.allWrap = <div class="submenuItem"> | </div>
>>     # Enable active state and set properties:
>>   ACT = 1
>>   ACT.allWrap = <div class="submenuItem act"> | </div>
>> }
>> 
>> # Main TEMPLATE cObject for the BODY
>> temp.mainTemplate = TEMPLATE
>> temp.mainTemplate {
>>     # content from the Auto-parser to the TEMPLATE:
>>   template =< plugin.tx_automaketemplate_pi1
>>     # Select only the content between the <body>-tags
>>   workOnSubpart = DOCUMENT_BODY
>>     # Page Menu
>>   subparts.menu_1 < temp.menu_1
>>     # Page Content
>>   subparts.content < styles.content.get
>>   subparts.content_right < styles.content.getRight
>>   subparts.content_left < styles.content.getLeft
>> }
>> 
>> # Main TEMPLATE cObject for the HEAD
>> temp.headTemplate = TEMPLATE
>> temp.headTemplate {
>>     # content from the Auto-parser to the TEMPLATE:
>>   template =< plugin.tx_automaketemplate_pi1
>>     # Select only the content between the <head>-tags
>>   workOnSubpart = DOCUMENT_HEADER
>> }
>> 
>> # Write to Page
>> page = PAGE
>> page.typeNum = 0
>> page.10 < temp.mainTemplate
>> page.headerData.10  < temp.headTemplate
>> page.config.doctype = xhtml_trans
>> ====================================================
>> 

-- 
AyrA.ch Administration


More information about the TYPO3-german mailing list