Hallo an alle!
Bei mir sind alle Sprachen synchronisiert, es gibt aber Paar Kategorien, die nur in eine Sprache vorhanden sind. Wenn ich einfach mittels
Code: Alles auswählen
<a href="front_content.php?'."idcat=$idcat&idart=$idart&changelang=6".'">FRA</a>
Hab gerade probiert in meinen Sprachwechselmodul eine Überprüfung einbauen, wo geprüft wird ob verlinktes Artikel bzw. Kategorie vorhanden ist:
Code: Alles auswählen
<?php
$inwork = "http://www.homepage.de/cms/upload/inwork/index.html";
if ($idcat == 0 && &idart == 0)
{
echo "<div id=\"navcontainer\">";
echo "<ul id=\"navlist\">";
echo "<li><a class=\"sprache\" href=\"$inwork\">ESP</a></li>";
if ($lang == "6") { echo "<li><a class=\"activesprache\" href=\"front_content.php?changelang=6\">FRA</a></li>"; }
else { echo "<li><a class=\"sprache\" href=\"front_content.php?changelang=6\">FRA</a></li>"; }
if ($lang == "9") { echo "<li><a class=\"activesprache\" href=\"front_content.php?changelang=9\">RUS</a></li>"; }
else { echo "<li><a class=\"sprache\" href=\"front_content.php?changelang=9\">RUS</a></li>"; }
if ($lang == "2") { echo "<li><a class=\"activesprache\" href=\"front_content.php?changelang=2\">ENG</a></li>"; }
else { echo "<li><a class=\"sprache\" href=\"front_content.php?changelang=2\">ENG</a></li>"; }
if ($lang == "1") { echo "<li><a class=\"activesprache\" href=\"front_content.php?changelang=1\">DEU</a></li>"; }
else { echo "<li><a class=\"sprache\" href=\"front_content.php?changelang=1\">DEU</a></li>"; }
echo "<li><a class=\"sprache\"> </a></li></ul></div>";
}
else
{
echo "<div id=\"navcontainer\">";
echo "<ul id=\"navlist\">";
echo "<li><a class=\"sprache\" href=\"$inwork\">ESP</a></li>";
if ($lang == "6") { echo '<li><a class="activesprache" href="front_content.php?'."idcat=$idcat&idart=$idart&changelang=6".'">FRA</a></li>'; }
else { echo '<li><a class="sprache" href="front_content.php?'."idcat=$idcat&idart=$idart&changelang=6".'">FRA</a></li>'; }
if ($lang == "9") { echo '<li><a class="activesprache" href="front_content.php?'."idcat=$idcat&idart=$idart&changelang=9".'">RUS</a></li>'; }
else { echo '<li><a class="sprache" href="front_content.php?'."idcat=$idcat&idart=$idart&changelang=9".'">RUS</a></li>'; }
if ($lang == "2") { echo '<li><a class="activesprache" href="front_content.php?'."idcat=$idcat&idart=$idart&changelang=2".'">ENG</a></li>'; }
else { echo '<li><a class="sprache" href="front_content.php?'."idcat=$idcat&idart=$idart&changelang=2".'">ENG</a></li>'; }
if ($lang == "1") { echo '<li><a class="activesprache" href="front_content.php?'."idcat=$idcat&idart=$idart&changelang=1".'">DEU</a></li>'; }
else { echo '<li><a class="sprache" href="front_content.php?'."idcat=$idcat&idart=$idart&changelang=1".'">DEU</a></li>'; }
echo "<li><a class=\"sprache\"> </a></li></ul></div>";
}
?>
Code: Alles auswählen
if ($idcat == 0 && &idart == 0) {….} else {….}
Könnte jemand helfen?