Zum Inhalt springen

Wie kann ich einen Link einbauen?

Erstellt am 20. März 2007 · 10 Antworten · letzte Antwort am 22. März 2007

Tags: Links, Frage

einpraegsam.​net ·

Ich gehe davon aus, dass du zwei links am marker ###MENU2### einfügen willst!?

Erstelle einfach ein Menü mit dem Startpunkt eines Sysordners das an dem Marker ausgegeben werden soll. Jetzt kannst du in deinem Sysordner so viele Seiten (interne- oder externe Links, etc...) erstellen wie du willst.

Neodan ·

Ja genau an dem Marker.

Den Sysordner hab ich, der Rest wird schwieriger, bin noch neu.
Es werden nur 2 Seiten, die aber getrennt von einem | werden sollen.

Neodan ·

Kannst du mir sagen was ich ins Setup schreiben muss, damit ich den MArker ansprechen kann und dann am dem sysordner die Seiten auslesen kann?

Annna ·

Hay!

So ungefähr:

 ## Ersetzen Platzhalter MENU_OBEN durch ein Hierarisches Textmenu
  ## Anzeige ab Seite mit der id=21(Menu oben) Ebene 1 ist ein TMENU (Textmenu)
  MENU_OBEN = HMENU
  MENU_OBEN {
    special = directory
    special.value = 21
    1 = TMENU
    1.NO = 1
    1.NO.linkWrap = &_nbsp;|&_nbsp;&_#124; |*| &_nbsp;|&_nbsp;&_#124; |*| &_nbsp;|
     }

P.S.
Wenn Du das nächste mal Deinem Beitrag was nachschieben willst,
es gibt da oben rechts einen Button [bearbeiten] - kommt besser rüber.
Viele Grüße
Annna

_____
PPS by just2b: Statt &_ nur &
-----
PPS Danke justb2, keine Ahnung wie die hier reingekommen sind, ich hab die Striche bei mir nicht im Skript.
----
PPS Da sieht man mal, dass auch das Mittwald-Team (das ja auch dieses Forum hier programmiert) nicht so vollkommen ist, wie es das oft von uns erwartet.

Neodan ·

Hmm, also ich hab getan was du mir gesagt hast:

1. Ins Setup Feld des Template kopiert.
2. MENU_OBEN durch Menu_2 ersetzt da der Marker ja so bei mir heißt.
3. Seiten ID auf meinen SysOrdner angepasst da dort drin die beiden Seiten liegen die angezeigt werden sollen.
4. Die Unterstriche entfernt, da sie ja zuviel waren.
5. Cache gelöscht, Seite neu geladen.

Allerdings ist das ganze nicht von erfolg gekrönt. Der MArker wird ja noch nichtmal angesprochen...

just2b ·
Neodan schrieb

Allerdings ist das ganze nicht von erfolg gekrönt. Der MArker wird ja noch nichtmal angesprochen...

und dann liegt es vermutlich nicht am Menü sondern an der Einbindung, gib doch mal dein ganzes TS her

georg

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

# Read the template file:
  content = FILE
  content.file = fileadmin/template/main/template.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/
}

# Ersetzen Platzhalter Menu_2 durch ein Hierarisches Textmenu
# Anzeige ab Seite mit der id=4(Menu oben) Ebene 1 ist ein TMENU (Textmenu)
  Menu_2 = HMENU
  Menu_2 {
    special = directory
    special.value = 4
    1 = TMENU
    1.NO = 1
    1.NO.linkWrap =  | | |*|  | | |*|  |
} 

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


# 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 some example content:
  subparts.menu_1 < temp.menu_1

# Substitute the ###content### subpart with some example content:
  subparts.content < styles.content.get
  maxW = 645
}

# 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

Ist halt mit der Seite und mit meinem Wissen gewachsen...

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

# Read the template file:
  content = FILE
  content.file = fileadmin/template/main/template.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/
}

# Ersetzen Platzhalter Menu_2 durch ein Hierarisches Textmenu
# Anzeige ab Seite mit der id=4(Menu oben) Ebene 1 ist ein TMENU (Textmenu)
temp.Menu_2 = HMENU
temp.Menu_2 {
    special = directory
    special.value = 4
    1 = TMENU
    1.NO = 1
    1.NO.linkWrap = &nbsp;|&nbsp;&#124; |*| &nbsp;|&nbsp;&#124; |*| &nbsp;|
} 

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


# 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 some example content:
  subparts.menu_1 < temp.menu_1

# Substitute the ###content### subpart with some example content:
  subparts.content < styles.content.get
  maxW = 645
}

# 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

Hab ich gemacht (wie man oben sieht) ändert sich trotzdem nix.