Kom ihåg mig?
Home Menu

Menu


Hjälp med meny!

 
Ämnesverktyg Visningsalternativ
Oläst 2007-05-26, 18:26 #1
Sonec Sonec är inte uppkopplad
Medlem
 
Reg.datum: Apr 2005
Inlägg: 241
Sonec Sonec är inte uppkopplad
Medlem
 
Reg.datum: Apr 2005
Inlägg: 241
Behöver hjälp med en meny för min ebutik..
www.onlinefilm.se/butik3

kod för meny i index.php
Kod:
<div id="menu"> 
  <?php 
     include("menu.php"); 
  ?>
	</div>

Kod i menu.php
Kod:
<?php if ($index_refer <> 1) { exit(include("./includes/exit.inc.php")); } ?>
<?php
      echo "<div id=\"navcontainer\">\n";

      if (CountCart() != 0) {
      echo "<h1>".$txt['menu2']."</h1>\n"; 
      echo "<ul id=\"navlist\">\n";
      echo "<li"; if ($page == "cart") { echo " id=\"active\""; }; echo "><a href=\"?page=cart&action=show\">".$txt['cart5'].": ".CountCart()."<br />";
      echo $txt['cart7'].": ".$currency_symbol.myNumberFormat(CalculateCart(), $number_format)."</a></li>";
      echo "</ul>";
      echo "<br />\n";
      }
      
      echo "<h1>".$txt['menu15']."</h1>\n"; 
      
              
      // if the category is send, then use that to find out the group
      if ($cat != 0 && $group == 0) { $group = TheGroup($cat); }
      
      $query = "SELECT * FROM `group` ORDER BY `NAME` ASC";
    $sql = mysql_query($query) or die(mysql_error());

      if (mysql_num_rows($sql) == 0) {
      echo $txt['menu17']; // no groups found
      }
    else {
        echo "<ul id=\"navlist\">\n";
        while ($row = mysql_fetch_row($sql)) {
          if ($group != $row[0]) { 
        echo "<li><a href=\"index.php?group=" . $row[0] . "&page=categories\">" . $row[1] . "</a></li>\n"; 
      }
         else {
         //select/highlight
        echo "<li id=\"active\"><a id=\"current\" href=\"index.php?group=" . $row[0] . "&page=categories\">" . $row[1] . "</a></li>\n"; 
         }
        }
        echo "</ul>\n";
      }
      echo "<br />\n";
     
      echo "<h1>".$txt['menu14']."</h1>\n"; 
      echo "<ul id=\"navlist\">\n";
      echo "<li"; if ($page == "search") { echo " id=\"active\""; }; echo "><a href=\"index.php?page=search\">" . $txt['menu4'] . "</a></li>\n";
      if ($new_page == 1) { echo "<li"; if ($page == "browse" && $action=="shownew") { echo " id=\"active\""; }; echo "><a href=\"index.php?page=browse&action=shownew\">" . $txt['menu16'] . "</a></li>\n"; }
      if ($conditions_page == 1) { echo "<li"; if ($page == "conditions" && $action == "show") { echo " id=\"active\""; }; echo "><a href=\"index.php?page=conditions&action=show\">" . $txt['menu5'] . "</a></li>\n"; }
      
      if ($shipping_page == 1) { echo "<li"; if ($page == "info" && $action== "shipping") { echo " id=\"active\""; }; echo "><a href=\"index.php?page=info&action=shipping\">" . $txt['menu6'] . "</a></li>\n"; }
      if ($guarantee_page == 1) { echo "<li"; if ($page == "info" && $action== "guarantee") { echo " id=\"active\""; }; echo "><a href=\"index.php?page=info&action=guarantee\">" . $txt['menu7'] . "</a></li>\n"; }
      if ($aboutus_page == 1) { echo "<li"; if ($page == "info" && $action== "aboutus") { echo " id=\"active\""; }; echo "><a href=\"index.php?page=info&action=aboutus\">" . $txt['menu18'] . "</a></li>\n"; }
      
      echo "<li"; if ($page == "contact") { echo " id=\"active\""; }; echo "><a href=\"index.php?page=contact\">" . $txt['menu8'] . "</a></li>\n";
      echo "</ul>\n";
      
      echo "</div>";
?>

Det jag vill göra den till är en träd meny..
Så underkategorierna kommer syns direkt i menyn.


Hjälp uppskattas jääävligt mycket. Är du duktigt får du belöning..[CODE]
Sonec är inte uppkopplad   Svara med citatSvara med citat
 


Aktiva användare som för närvarande tittar på det här ämnet: 1 (0 medlemmar och 1 gäster)
 

Regler för att posta
Du får inte posta nya ämnen
Du får inte posta svar
Du får inte posta bifogade filer
Du får inte redigera dina inlägg

BB-kod är
Smilies är
[IMG]-kod är
HTML-kod är av

Forumhopp


Alla tider är GMT +2. Klockan är nu 06:48.

Programvara från: vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson
 
Copyright © 2017