Submenu getrennt anzeigen

  • Wachtda Wachtda
    Padawan
    0 x
    39 Beiträge
    0 Hilfreiche Beiträge
    07. 11. 2003, 15:29

    hallo leute!

    ich bin gerade dabei zu probieren
    das submenu vom "normalen" menu getrennt
    darzustellen.

    meine idee:

    links habe ich ganz normal ein menu, wenn eine
    seite noch level2 menus hat sollen diese am rechten
    rand der seite dargestellt werden.

    html template:

    [code:1:e4c86f1c45]
    <!-- Menu table cell: -->
    <td width="247" 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-level1-no"><a href="#">Menu item 2</a></div>
    </td>

    <!-- Page Content Area table cell: -->
    <td width="700" id="content">
    <h1>Inhalt</h1>
    <p class="bodytext">Adam Seth Enos Cainan Malelehel Iared Enoch Matusale Lamech Noe Sem Ham et Iafeth filii Iafeth Gomer Magog Madai et Iavan Thubal Mosoch Thirasporro filii Gomer Aschenez et Rifath et Thogorma filii autem Iavan Elisa et Tharsis Cetthim et Dodanim.</p>
    <p class="bodytext">Filii Ham Chus et Mesraim Phut et Chanaan filii autem Chus Saba et Evila Sabatha et Rechma et Sabathaca porro filii Rechma Saba et Dadan Chus autem genuit Nemrod iste coepit esse potens in terra Mesraim vero genuit Ludim et Anamim et Laabim et Nepthuim Phethrosim quoque et Chasluim de quibus egressi sunt Philisthim et Capthurim Chanaan vero genuit Sidonem primogenitum et Heth Iebuseum quoque et Amorreum et Gergeseum Evheumque et Aruceum et Asineum Aradium quoque et Samareum et Ematheum filii Sem Aelam et Assur et Arfaxad et Lud et Aram et Us et Hul et Gothor et Mosoch Arfaxad autem genuit Sala qui et ipse genuit Heber porro Heber nati sunt duo filii nomen uni Phaleg quia in diebus eius divisa est terra et nomen fratris eius Iectan Iectan autem genuit Helmodad et Saleph et Asermoth et Iare Aduram quoque et Uzal et Decla Ebal etiam et Abimahel et Saba necnon et Ophir et Evila et Iobab omnes isti filii Iectan Sem Arfaxad Sale Heber Phaleg Raau Serug Nahor Thare Abram iste est Abraham filii autem Abraham Isaac et Ismahel et hae generationes eorum primogenitus Ismahelis Nabaioth et Cedar et Adbeel et Mabsam </p>

    <br />
    </td>
    <td width="76" id="menu_2">
    <div class="menu2-level2-no"><a href="#">Level 2 item</a></div>
    <div class="menu2-level2-no"><a href="#">Level 2 item</a></div>
    <div class="menu2-level2-act"><a href="#">Level 2 item (act)</a></div> </td>
    </tr>
    [/code:1:e4c86f1c45]

    typo script:

    [code:1:e4c86f1c45]
    #################
    # 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

    ####################################
    # Configuring the Auto-Parser for main template:#
    ####################################
    plugin.tx_automaketemplate_pi1 {

    # Read the template file:
    content = FILE
    content.file = fileadmin/ims_template/main.html
    # content.file = media/uploads/crcph/main.htm

    # 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/ims_template/
    # relPathPrefix = media/uploads/crcph/

    }

    ############################
    # 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 ###menu_2### subpart with dynamic menu:
    subparts.menu_2 < temp.menu_2

    # 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

    }

    #############
    # Menu 1 cObject#
    #############
    temp.menu_1 = HMENU
    marks.menu_1 = HMENU
    marks.menu_1.entryLevel = 1

    # 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>

    # Enable active state and set properties:
    ACT = 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>

    # Enable active state and set properties:
    ACT = 1
    ACT.allWrap = <div class="menu1-level2-act"> | </div>

    }

    #############
    # Menu 2 cObject#
    #############
    temp.menu_2 = HMENU
    marks.menu_2 = HMENU
    marks.menu_2.entryLevel = 2

    # Second level menu-object, textual
    temp.menu_2.2 = TMENU
    temp.menu_2.2 {

    # Normal state properties
    NO.allWrap = <div class="menu2-level2-no"> | </div>

    # Enable active state and set properties:
    ACT = 1
    ACT.allWrap = <div class="menu2-level2-act"> | </div>

    }
    [/code:1:e4c86f1c45]

    ich bin noch ein blutiger anfänger, daher ist mein code
    sicherlich nicht das beste... :o

    findet ihr den fehler..?

    vielen dank
    daniel


  • 1
  • Nina_Fox Nina_Fox
    Typ im Roten Hemd
    0 x
    2 Beiträge
    0 Hilfreiche Beiträge
    09. 11. 2003, 00:20

    Hi,

    habe haar-genau dasselbe Problem. Wurde bestimmt schon 1000000mal gelöst, aber ich finde die Lösung einfach nicht.

    Könnte sich bitte jemand erbarmen???

    Thanks, Greetings #paralyzed#
    Nina

  • sw-student sw-studen...
    Jedi-Ratsmitglied
    0 x
    677 Beiträge
    0 Hilfreiche Beiträge
    10. 11. 2003, 08:44

    Wie wär's wenn du mal die ganzen marks durch temps ersetzen würdest? #giggle#

  • Nina_Fox Nina_Fox
    Typ im Roten Hemd
    0 x
    2 Beiträge
    0 Hilfreiche Beiträge
    10. 11. 2003, 10:49

    Hi,

    also bei mir lag das Problem an der temp.rightnav.2, hier muß "1" rein.... damit klappts bei mir ....

    temp.rightnav = HMENU
    temp.rightnav.entryLevel = 1
    temp.rightnav.1 = TMENU
    temp.rightnav.1 {
    NO.allWrap = <img src="clear.gif" width="25" height="13" border="0" alt=""> |
    NO.ATagParams= class="generic"
    NO.linkWrap = |&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td height="25" valign="middle" onMouseOver="this.bgColor=&#039;#F79A7C&#039;" onMouseOut="this.bgColor=&#039;#EFEFEF&#039;" id="rightnav"&gt;
    }

    Vielen Dank,

    Grüße
    Nina

  • 1