Folgendes Nav-Template habe ich erstellt:
<we:ifSelf id="371">
Hauptebene:
<table border="0" cellpadding="0" cellspacing="0" width="144">
<we:block name="Menu_Level_1" showselect="false">
<tr><td height=20><we:input type="text" name="Menu_Level_1_ID" size="5"/><we:link name="Menu_Level_1_Link"/></td></tr>
</we:block>
</table>
Subebene:
<we:block name="Menu_Level_1" showselect="false">
<table border="0" cellpadding="0" cellspacing="0" width="144">
<we:block name="Menu_Level_2" showselect="false">
<tr><td height=20><we:input type="text" name="Menu_Level_2_ID" size="5"/><we:link name="Menu_Level_2_Link"/></td></tr>
</we:block>
</table>
</we:block>
<we:else/>
<?php
$block3 = unserialize($we_doc->getElement("Menu_Level_1"));
global $i3;
global $max3;
global $sub_i3;
global $sub_max3;
$i3 = 0;
$max3 = 0;
$sub_i3 = 0;
$sub_max3 = 0;
$max3 = sizeof($block3);
$max3 = $max3-1;
?>
<we:block name="Menu_Level_1" showselect="false">
<we:ifEqual name="Menu_Level_1_ID" eqname="Menu_Level_1_Control">
<?
if ($GLOBALS["i3"] == 0) {
?>
Ausgabe Nav erster aktiver Hauptmenüpunkt
<?} elseif ($GLOBALS["i3"] == $GLOBALS["max3"]) { ?>
<we:ifNotEmpty match="Menu_Level_2">
Ausgabe Nav letzter aktiver Hauptmenüpunkt unten mit vorhandenen Submenüpunkten
<we:else/>
Ausgabe Nav letzter aktiver Hauptmenüpunkt unten ohne Submenüpunkte
</we:ifNotEmpty>
<?} else { ?>
Ausgabe Nav aktiver Hauptmenüpunkt
<? } ?>
<we:ifNotEmpty match="Menu_Level_2">
<?
$subblock3 = unserialize($GLOBALS["we_doc"]->getElement("Menu_Level_2"));
$GLOBALS["sub_max3"] = sizeof($subblock3);
$GLOBALS["sub_max3"] = $GLOBALS["sub_max3"]-1
?>
<we:block name="Menu_Level_2" showselect="false">
<we:ifEqual name="Menu_Level_2_ID" eqname="Menu_Level_2_Control">
<? if ((\$GLOBALS["i3"] == \$GLOBALS["max3"]) && (\$GLOBALS["sub_i3"] == \$GLOBALS["sub_max3"])) { ?>
Ausgabe Nav letzter aktiver Hauptmenüpunkt unten mit letztem aktiven Submenüpunkt
<?} else { ?>
Ausgabe Nav aktiver Hauptmenüpunkt unten mit aktiven Submenüpunkt
<? } ?>
<we:else/>
<? if ((\$GLOBALS["i3"] == \$GLOBALS["max3"]) && (\$GLOBALS["sub_i3"] == \$GLOBALS["sub_max3"])) { ?>
Ausgabe Nav letzter aktiver Hauptmenüpunkt unten mit letztem inaktiven Submenüpunkt
<?} else { ?>
Ausgabe Nav aktiver Hauptmenüpunkt unten mit inaktiven Submenüpunkt
<? } ?>
</we:ifEqual>
<? \$GLOBALS["sub_i3"]++; ?>
</we:block>
</we:ifNotEmpty>
<we:else/>
<?
if ($GLOBALS["i3"] == 0) {
?>
AAusgabe Nav erster inaktiver Hauptmenüpunkt
<?} elseif ($GLOBALS["i3"] == $GLOBALS["max3"]) { ?>
Ausgabe Nav letzter inaktiver Hauptmenüpunkt ohne Submenüpunkte
<?} else { ?>
Ausgabe Nav inaktiver Hauptmenüpunkt ohne Submenüpunkte
<? } ?>
</we:ifEqual>
<? $GLOBALS["i3"]++; ?>
</we:block>
</we:ifSelf>
Ich frage darin per PHP das Maximum und den ersten Wert ab. Dies dient zur Erstellung von grafischen Elementen am Beginn und Ende der Nav.
Problem ist nun das ich das Sublevel Maximum für jeden einzelnen Toplevel Punkt nicht herausfinde, da ich immer das Sublevel Maximum des ersten Toplevel Punktes bekomme.
Ich müsste nun wissen, wie ich wirklich den Subblock bekomme, der zum entsprechenden Hauptmenuepunkt gehört, damit ich dessen Werte auslesen kann.
Kann mir einer helfen?
Weiteres Thema Blöcke und Navigationen
Fragen zum Erstellen von Templates für webEdition.
Zurück zu „webEdition Templates erstellen (we:Tags)“
Gehe zu
- Deutschsprachiges Supportforum
- ↳ webEdition Installation & Update
- ↳ webEdition Administrationsoberfläche
- ↳ Basisversion
- ↳ Backup und Serverumzug
- ↳ webEdition Module
- ↳ Banner-/Statistik Modul
- ↳ Benutzerverwaltung
- ↳ DB-/Objektmodul
- ↳ Editor PlugIn
- ↳ Export Modul
- ↳ Import- /Exportfunktionen
- ↳ Kundenverwaltung
- ↳ Navigations Modul
- ↳ Newsletter Modul
- ↳ Scheduler
- ↳ Shop Modul
- ↳ ToDo / Messaging Modul
- ↳ Voting Modul
- ↳ Workflow Modul
- ↳ Weitere Validierungsdienste
- ↳ webEdition Templates erstellen (we:Tags)
- ↳ webEdition Development Center
- ↳ Hooks
- ↳ Patches, Bugs und Contributions
- ↳ SDK
- ↳ Collaborations
- ↳ Web-Technik
- ↳ (X)HTML
- ↳ CSS
- ↳ JavaScript
- ↳ PHP
- ↳ webEdition und Suchmaschinen
- ↳ Off-Topic & Smalltalk
- ↳ webEdition Open Source
- ↳ Contributions
- ↳ Organisation der Community
- ↳ Community-Treffen
- ↳ Vereinsgründung
- ↳ Webseiten
- ↳ webEdition Feature Requests
- ↳ Stellenmarkt (webEdition only!)
- ↳ Anleitungen / Tutorials
- English Support Forum
- ↳ webEdition Basic Version
- ↳ Installation and update
- ↳ Creating templates
- ↳ (X)HTML and CSS
- ↳ JavaScript
- ↳ webEdition Modules
- ↳ Banner Module
- ↳ User Management
- ↳ Newsletter Module
- ↳ Scheduler
- ↳ Shop Module
- ↳ ToDo / Messaging Module
- ↳ Workflow Module
- ↳ Customer Management
- ↳ DB / Object Module
- ↳ webEdition Development Center
- ↳ SDK
- ↳ Patches, Bugs and Contributions
- ↳ Off-Topic & Smalltalk
Wer ist online?
Mitglieder in diesem Forum: Google [Bot] und 19 Gäste