Nur normaler Content funktioniert!?

  • Fabian-K Fabian-K
    Jedi-Ratsmitglied
    0 x
    581 Beiträge
    0 Hilfreiche Beiträge
    19. 04. 2005, 14:33

    Hallo,

    ich bin dabei ein Template fuer typo3 zu entwickeln.

    Ich habe Part1 des 'Moderne Template erstellung' durch,
    allerdings wird dort ja nur beschrieben wie man ein 'normalen' content einfuegt.

    Wie allerdings fuege ich rechts/links/am rand ein Content ein?

    Das Content an sich existiert, aber es wird nicht angezeigt.

    Wie gesagt: Es sind nur Contents sichtbar, die sich in der Mitte der Seite befindet (also 'Normal').

    Hier also mal meine Main Template-Setup:
    [code:1:b991264c38]# Main TEMPLATE cObject for the BODY
    temp.mainTemplate = TEMPLATE
    temp.mainTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
    template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <body>-tags
    workOnSubpart = DOCUMENT_BODY

    # Substitute the ###menu_1### subpart with dynamic menu:
    subparts.menu_1 < temp.menu_1

    # Substitute the ###content### subpart with some example content:
    subparts.content < styles.content.get

    }


    # Main TEMPLATE cObject for the HEAD
    temp.headTemplate = TEMPLATE
    temp.headTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
    template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <head>-tags
    workOnSubpart = DOCUMENT_HEADER
    }

    # Default PAGE object:
    page = PAGE
    page.typeNum = 0

    # Copying the content from TEMPLATE for <body>-section:
    page.10 < temp.mainTemplate

    # Copying the content from TEMPLATE for <head>-section:
    page.headerData.10 < temp.headTemplate[/code:1:b991264c38]

    Hier meine HTML-Seite:
    [code:1:b991264c38]<?xml version="1.0" excoding="iso.8859-1"?>
    <?xml-stylesheet href="#internalStyle" type="text/css"?>
    <!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EM"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transidional.dtd">
    <html>
    <head>
    <title>Base template, header, menu, content and footer.</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <style type="text/css" id="internalStyle">
    /*<![CDATA[*/
    BODY { margin: 0 0 0 0; background-color: white; }
    /*]]>*/
    </style>
    <link href="res/stylesheet.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <table border="0" cellpadding="0" cellspacing="0">

    <!-- Header image row: -->
    <tr>
    <td colspan="2" id="header_1"><img src="images/headerimage.jpg" width="600" height="100" alt="" border="0" /></td>
    </tr>
    <tr>

    <!-- Menu table cell: -->
    <td id="menu_1">
    <div class="menu1-level1-no"><a href="#">Menu item 1</a></div>
    <div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
    <div class="menu1-level1-act"><a href="#">Menu item 3 (act)</a></div>
    <div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
    <div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
    <div class="menu1-level2-act"><a href="#">Level 2 item (act)</a></div>
    <div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
    </td>

    <!-- Page Content Area table cell: -->
    <td id="content">
    <h1>Buy PaperShredder(tm) Gizmo with 30-days money-back guarantee!</h1>
    <img src="images/paperwork.jpg" width="192" height="156" border="0" alt="" align="right"/>
    <p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
    <p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
    <br />
    </td>
    </tr>

    <!-- Footer row: -->
    <tr>
    <td colspan="2" id="footer">
    <p>Main Dish & Son inc. * 12345 MuhKuh City, suite 1337 * Hannover</p>
    </td>
    </tr>
    </table>
    </body>
    </html>[/code:1:b991264c38]

    Was muss ich tun, um auch 'linke' oder 'rechte' oder wie auch immer andere contents anzuzeigen?

    Danke schonmal im Voraus ;)

    mfg
    fabian-k

    P.S.:
    Da es gerade etwas eilt, kann ich mir leider nicht erst alle tutorials durchlesen, dazu habe ich im Moment (!!) leider keine zeit :( Ich hoffe ihr koennt das verstehen. Danke.


  • lynatic lynatic
    R2-D2
    0 x
    85 Beiträge
    0 Hilfreiche Beiträge
    19. 04. 2005, 14:58

    Hallo!

    setze auch rechts (in einer eigenen tabelle) einen marker, bsp: ###RECHTS###

    + setup:
    [code:1:e89497894e]RECHTS = CONTENT
    RECHTS {
    table = tt_content
    select.orderBy = sorting
    select.where = colPos = 2
    }
    [/code:1:e89497894e]

  • webdeveloper webdevelo...
    Jedi-Ratsmitglied
    0 x
    862 Beiträge
    0 Hilfreiche Beiträge
    19. 04. 2005, 16:08

    jip.

    mini-tutorial findest du unter
    > http://www.plug-one.de/show_content_lrb.html

  • bajun bajun
    T3PO
    0 x
    27 Beiträge
    0 Hilfreiche Beiträge
    19. 04. 2005, 16:08

    Bin zwar auch noch kein Profi...aber das ist leicht zu finden......

    Steht hier...... http://www.typo3forum.de/viewtopic.php?t=23065&sid=005fdb22e2ce53ce744e9e496b5c1d34

    Das hatte ich schon vor Wochen durch.... #giggle#

  • Fabian-K Fabian-K
    Jedi-Ratsmitglied
    0 x
    581 Beiträge
    0 Hilfreiche Beiträge
    19. 04. 2005, 16:45

    Hi,
    danke erstmal fuer die antworten, aber

    lynatic:
    Wenn ich den kram in meinen setup poste, dann wird in dem rechten Content falscher inhalt angezeigt :(
    (Es wird der Inhalt aus dem 'Normal'-Content angezeigt)

    bajun:
    Mh das is nich das was ich suche :(
    Da ich anfaenger bin braeuchte ich einen Beispielcode, so wie das von lynatic.. :(

    webdeveloper:
    Mh ja gut.. aber ich habe kein [code:1:341ce4a8c4]page.10 < styles.content.get[/code:1:341ce4a8c4] :(

  • webdeveloper webdevelo...
    Jedi-Ratsmitglied
    0 x
    862 Beiträge
    0 Hilfreiche Beiträge
    19. 04. 2005, 17:08

    [quote:15e9612666="lynatic"]Hallo!

    setze auch rechts (in einer eigenen tabelle) einen marker, bsp: ###RECHTS###

    + setup:
    [code:1:15e9612666]RECHTS = CONTENT
    RECHTS {
    table = tt_content
    select.orderBy = sorting
    select.where = colPos = 2
    }
    [/code:1:15e9612666][/quote:15e9612666]
    der code ist nciht für copy+paste gedacht...

    da fehlt jeweils das "seite."

    das was du brauchst, sieht final so aus:
    [code:1:15e9612666]
    seite = PAGE
    seite {
    typeNum = 0
    bodyTag = <body>
    10 = TEMPLATE
    10.template = FILE
    10.template.file = fileadmin/template.html
    10.workOnSubpart = DOKUMENT
    10.marks {
    RECHTS < temp.rechts
    LINKS < temp.links
    }
    }
    [/code:1:15e9612666]
    lege nun ein neues template an.

    [code:1:15e9612666]temp.rechts = CONTENT
    temp.rechts {
    table = tt_content
    select.orderBy = sorting
    select.where = colPos = 2
    }
    [/code:1:15e9612666]

    das template musst du dann nur noch in dein master/root template integrieren.

    dies machst du über den punkt
    [b:15e9612666]Click here to edit whole template record[/b:15e9612666], dann runter bis [b:15e9612666]Include basis template:[/b:15e9612666].
    dort fügst du dein neues template (z.b. + temp.rechts) hinzu.

    hoffe das war jetzt verständlich, habe z.zt. nur wenig zeit...
    ausführlicher kann ich dir heute abend helfen, wenn du es jetzt nicht schaffst.


  • 0 x
    19. 04. 2005, 17:10

    Du hast Objekte denen Du was zuordnest. Am einfachsten machst Du das bei Text, in dem Du statische Templates einbindest.

    D.h.:
    statische Templates einbinden: z.b. content (default) und cSet stylesheet.

    Dann: Marker in Deiner HTML Vorlage setzen (CONTENT, CONTENT_RIGHT, CONTENT_LEFT)

    Die Marker dann bedienen mit styles.content.get, styles.content.getRight, styles.content.getLeft)
    Dann brauchst Du Dich nicht mit colPos etc. herumschlagen. Der Zuweisungsoperator ist <

    Viele Grüße
    Niki

    NACHTRAG: Oder Du machst es so wie webdeveloper schreibt :) Waren wir wohl gleichzeitig.

  • Fabian-K Fabian-K
    Jedi-Ratsmitglied
    0 x
    581 Beiträge
    0 Hilfreiche Beiträge
    19. 04. 2005, 17:27

    Hey :)
    Werde sicherlich darauf zurueckkommen ;)

    Naja werde jetz mal mein bestes geben und das mal ausprobieren..

    Danke erstmal :)

  • Fabian-K Fabian-K
    Jedi-Ratsmitglied
    0 x
    581 Beiträge
    0 Hilfreiche Beiträge
    19. 04. 2005, 20:27

    So,
    da ich es natuerlich NICHT hinbekommen habe (schade :( ) hier nochmal meine aktuelle Template-Setup (ist in 3 teile aufgeteilt, die ins Haupt-Template geladen werden.)

    [code:1:796d73bdc0]ext: Main TEMPLATE cObject
    ----------------------------------------
    # Main TEMPLATE cObject for the BODY
    temp.mainTemplate = TEMPLATE
    temp.mainTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
    template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <body>-tags
    workOnSubpart = DOCUMENT_BODY

    # Substitute the ###menu_1### subpart with dynamic menu:
    subparts.menu_1 < temp.menu_1

    # Substitute the ###content### subpart with some example content:
    subparts.content < styles.content.get

    }


    # Main TEMPLATE cObject for the HEAD
    temp.headTemplate = TEMPLATE
    temp.headTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
    template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <head>-tags
    workOnSubpart = DOCUMENT_HEADER
    }

    # Default PAGE object:
    page = PAGE
    page.typeNum = 0

    # Copying the content from TEMPLATE for <body>-section:
    page.10 < temp.mainTemplate

    # Copying the content from TEMPLATE for <head>-section:
    page.headerData.10 < temp.headTemplate
    ----------------------------------------
    ----------------------------------------

    ext: Menu 1
    ----------------------------------------
    # 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="menu1-level1-no"> | </div>
    NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
    ACT = 1
    ACT.stdWrap.htmlSpecialChars = 1
    ACT.allWrap = <div class="menu1-level1-act"> | </div>
    }

    # Second level menu-object, textual
    temp.menu_1.2 = TMENU
    temp.menu_1.2 {
    # Normal state properties
    NO.allWrap = <div class="menu1-level2-no"> | </div>
    NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
    ACT = 1
    ACT.stdWrap.htmlSpecialChars = 1
    ACT.allWrap = <div class="menu1-level2-act"> | </div>
    }

    # Third level menu-object, textual
    temp.menu_1.3 = TMENU
    temp.menu_1.3 {
    # Normal state properties
    NO.allWrap = <div class="menu1-level3-no"> | </div>
    NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
    ACT = 1
    ACT.stdWrap.htmlSpecialChars = 1
    ACT.allWrap = <div class="menu1-level3-act"> | </div>
    }

    # Fourth level menu-object, textual
    temp.menu_1.4 = TMENU
    temp.menu_1.4 {
    # Normal state properties
    NO.allWrap = <div class="menu1-level4-no"> | </div>
    NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
    ACT = 1
    ACT.stdWrap.htmlSpecialChars = 1
    ACT.allWrap = <div class="menu1-level4-act"> | </div>
    }
    ----------------------------------------
    ----------------------------------------

    ext: Auto-parser plugin
    ----------------------------------------
    # Configuring the Auto-Parser for main template:
    plugin.tx_automaketemplate_pi1 {
    # Read the template file:
    content = FILE
    content.file = fileadmin/template/main/template_1.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/
    }[/code:1:796d73bdc0]

    Es existiert auch das ###RECHTS### in der HTML-Seite..

    Aber irgendwie will das alles nich so wie ich das ausprobiert hatte :(
    Kann mir jemand sagen wo was da rein muss?

    Momentan wird im 'Rechts'-Bereich der template-datei halt automatisch der Kram aus dem 'Normal'-bereich angezeigt :-/

  • webdeveloper webdevelo...
    Jedi-Ratsmitglied
    0 x
    862 Beiträge
    0 Hilfreiche Beiträge
    19. 04. 2005, 21:10

    Ich glaub 18Std pro Tag am Rechner sitzen macht blind...

    Wo steht der Marker rechts?? Also im TS