Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Typo3 - Submenü in Subpart

Empfohlene Antworten

Veröffentlicht

Hi,

Ich bin gerade dabei mein erstes Projekt mit Typo3 zu machen. Das ist soweit auch alles ok, nur hatte ich jetzt eine Idee. also erstmal was ich bisher habe:

Die Seite hat ein Hauptmenü, das horizontal unter dem Kopfbereich steht. Manche Punkte haben noch Unterpunkte, die werden in einem Menü vertikal auf der rechten Seite angezeigt. Das geht auch alles :) Jetzt haben einige von den Unterpunkten aber nochmal Unterpunkte. Diese werden als 2. Menülevel im vertikalen Menü angezeigt. Im Hauptbereich haben wir diese Unterpunkte zur einfacheren Navigation nochmal, von Hand in den Text eingepflegt.

Also ungefähr so (ich probier das mal darzustellen hier):



---

Seitenkopf mit Logo

---

Hauptmenü: Punkt 1 Punkt 2 Punkt 3

---


Detail 1 Detail2                                         Unterpunkt 1

                                                         Unterpunkt 2  

Hauptbereich der Seite                                      Detail 1

                                                             Detail 2

                                                         Unterpunkt 3


Nun hab ich mir gedacht, die Punkte Detail könnte ich ja wir das Untermenü per TypoScript einbinden, nur halt ein entryLevel tiefer. Aber da der Bereich im Content-Div liegt, wird er ja vom Script komplett ersetzt. Hab es mit substMarksSeparately probiert, was ja da helfen soll, aber nichts. Hier mal mein TS (teilweise):

# submenu shown in content

temp.sub_menu = HMENU

temp.sub_menu.entryLevel = 2

temp.sub_menu.1 = TMENU

temp.sub_menu.1 {

  NO.allWrap = <span class="menuitem"> | </span>  ∙  

  # enable active state

  ACT = 1

  ACT.allWrap = <span class="menuitem_active"> | </span>  ∙  

}

...

# main TEMPLATE cObject for the BODY

temp.mainTemplate = TEMPLATE

temp.mainTemplate {

  # enable marks in subparts

  substMarksSeparately = 1

  # 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_horz### subpart with content

  subparts.menu_horz < temp.menu_horz


  # Substitute the ###menu_vert### subpart with content

  subparts.menu_vert < temp.menu_vert


  # Substitute the ###sub_menu### with content

  subparts.sub_menu < temp.sub_menu


  # Substitute the ###content### subpart with content

  subparts.content < styles.content.get


}

Also bis auf den sub_menu Part geht alles. Kennt sich hier jemand damit aus?

Falls es jemanden interessiert, hier meine Lösung:


# main TEMPLATE cObject for the BODY

temp.mainTemplate = TEMPLATE

temp.mainTemplate {


  # Bearbeitung von marks in subparts einschalten

  substMarksSeparately = 1

[...]

  # Untermenü vom vertikalen Menü als Menü für den Contentbereich

  marks.SUB_MENU = HMENU

  marks.SUB_MENU < temp.sub_menu

[...]

Der Rest (bis auf den SUB_MENU-Teil) ist gleich geblieben.

In der HTML-Vorlage muss dann nur ein ###SUB_MENU### eingefügt werden, und das wird dann bei der Ausgabe ersetzt. Entweder durch das Menü oder, falls kein Menü vorhanden, durch nichts (also das ###SUB_MENU### verschwindet auf jeden Fall).

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.