Seite 2 von 2
Soweit so gut...
Verfasst: Di 21. Dez 2004, 14:09
von coarsy
Mein Template (navfirst_h_off) sehen nun wie folgt aus:
Code: Alles auswählen
<!-- BEGIN:BLOCK -->
<td align="center" bgcolor="#BB655D" style="border-top: 1px solid #FFFFFF; border-bottom: 1px solid #FFFFFF; height: 20px;"><a style="font-family: verdana, arial, helvetica, sans-serif;
font-weight: normal;
font-size: 11px;
text-decoration: none;
color: #FFFFFF;" target="{TARGET}" href="{HREF}">{NAME}</a></td>
{if(({CURRENT} >= 1) && ({CURRENT} < 5) && )}
<td width="1" align="center"><img src="img/1_back.gif" border="0"></td>
{/if}
<!-- END:BLOCK -->
Sprich müßte ich nun noch reinbekommen, wie ich die Ausgabe von dem Trenner unterbinden kann, wenn das darauffolgende Template aktiv ist... Aber wie bekomme ich das raus?
Verfasst: Di 21. Dez 2004, 14:16
von swelpot
fehler von mir.
hatte nicht berücksichtigt, dass es ja eh zwei verschiedene templates gibt.
bei dieser art von navimodul wird dir leider die erweiterte templateklasse nicht weiterhelfen, da das template für jeden einzelnen navigationspunkt neu generiert wird. {counter} wird dann jedesmal 1 sein und natürlich nicht hochzählen...
ich denke, dass du dir im modul selbst behelfen musst..
sorry für die hoffnungsmache...[/code]
Habs jetzt mal im Modul so gebaut...
Verfasst: Di 21. Dez 2004, 14:56
von coarsy
Es geht also darum, dass, wenn der nächste horizontale Menu Punk aktiviert ist, den link danebenstehenden Trennstrich NICHT anzuzeigen... Das muß doch irgendwie funzen... Viele Dank nochmal für Eure Hilfe!
Code: Alles auswählen
echo '<table cellspacing="0" cellpadding="0" width="100%" border="0"><tr>';
$i = 1;
foreach ($navitems as $key => $data) {
/* 1. Navigations Ebene */
$tpl->reset();
$tpl->set('d', 'NAME', $data['name']);
$tpl->set('d', 'TARGET', $data['target']);
$tpl->set('d', 'HREF', $sess->url('front_content.php?idcat='.$data['idcat']));
$tpl->set('d','CURRENT',$i);
$tpl->next();
if ($idcat == $data['idcat'] || is_array($data['sub'])) {
echo "<td align=\"center\" bgcolor=\"#E5F9FD\" style=\"border-top: 1px solid #FFFFFF;\"><a style=\"font-family: verdana, arial, helvetica, sans-serif;";
echo "font-weight: bold; font-size: 11px; text-decoration: none; color: #9E3D34;\" target=\"".$data['target']."\" href=\"".$sess->url('front_content.php?idcat='.$data['idcat'])."\">".$data['name']."</a></td>";
}
else {
echo "<td align=\"center\" bgcolor=\"#BB655D\" style=\"border-top: 1px solid #FFFFFF; border-bottom: 1px solid #FFFFFF; height: 20px;\"><a style=\"font-family: verdana, arial, helvetica, sans-serif;";
echo "font-weight: normal; font-size: 11px; text-decoration: none;color: #FFFFFF;\" target=\"".$data['target']."\" href=\"".$sess->url('front_content.php?idcat='.$data['idcat'])."\">".$data['name']."</a></td>";
if ($i < 5){
echo "<td width=\"1\" align=\"center\"><img src=\"img/1_back.gif\" border=\"0\"></td>";
}
}
if (is_array($data['sub'])) {
$tmp_data = array();
$tmp_data = $data;
} // end if
$i++;
} // end foreach
echo '</tr></table>';