CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Dynamic AND static navigation menu

Print topic Send  topic

Author Message
homeworld-music.com
Posted: 08/29/2003, 12:27 AM

CC 2.0.5, PHP, MySQL



My yet unsolved problem is that I have to build a site which has dynamic
('Kategorie 1', 'Kategorie 2', ' Kategorie 3', 'Kategorie 4' and 'Kategorie
5') and static items ('Home', 'Events', 'Admin') in its navigation menu. For
the static items the only solution is to use the 'menu form' what on the
other hand does not work if I want to dynamically generate the other parts
from the database.



By this time I was able to write a little code in the BeforeShow-event of
the menu form which generates the dynamic menu items:



$max_kat = dlookup("categories", "max(category_id)", "category_id");

for($i=1;$i<($max_kat+1);$i++) {
$mn_kat_name = dlookup("categories", "category_desc", "category_id =" . $i);
$fldmn_kat = "<a href = 'kat.php?category_id=" . $i . "&'>" . $mn_kat_name .
"</a><br>";
var_dump($fldmn_kat);
}



Using the var_dump-order all items are shown at the top of the site, same
happens if I echo the variable instead. But in the 'mn_kat'-field (label) of
the menu there is only the last record set ('Kategorie 5', not 'Kategorie 1'
to '. 4') displayed.



Now I am looking for a solution to display the echo-result into the
mn_kat-label field as it is shown on the top of the site.

Or I need a function that dynamically generates as many label fields as in
the result of $max_kat which can by filled one by one.



Any ideas? I have been working on this since yesterday morning, I guess, I
cannot see the forest for the trees anymore . ;-)



Thanks in advance!



Jari-Hermann Ernst

jhe@homeworld-music.com


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.