Jump to content


Photo

How do I populate a CSS menu with php data?


  • Please log in to reply
3 replies to this topic

#1 figster

figster
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 11 June 2006 - 03:43 PM

My question seems like a simple one.. and yet I have had great dificulty finding the answer. I have a collapsable css menu design that I want to use on my article directory web site. The catagories are created in my admin section and sent to mysql data base and it returns a text catagory menu that looks awful. I am wanting to use a css menu to improve the look. How do I populate that menu with my catagory php data base?

Thanks,
Figster


#2 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 11 June 2006 - 08:54 PM

How are you outputting the text? Just what exactly are you using to output the first menu? Basically, all you need to do (if you want to do it like I would) is take all of the categories and create a list for each of them within the <li> tags of a master list. Then the links within the categories just come out of the database with an <a> tag and its contents.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#3 figster

figster
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 12 June 2006 - 02:05 AM

[!--quoteo(post=382648:date=Jun 11 2006, 04:54 PM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ Jun 11 2006, 04:54 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
How are you outputting the text? Just what exactly are you using to output the first menu? Basically, all you need to do (if you want to do it like I would) is take all of the categories and create a list for each of them within the <li> tags of a master list. Then the links within the categories just come out of the database with an <a> tag and its contents.
[/quote]

Thanks for your help, My catagories are for an article directory and will be changeing a lot as the site grows. So there will be parent catagories and children possibly 3 generations. The Table I am trying to poulate the catagory menu with is $catagories. I just can't seem to get the coding to work. The basic site came with this
<ul>
$catagories
</ul>

And that did create a text link list of all the catagories. When I try to add some style to it.. they disapear. I need the code that will populate my collapsable css driven menu. Maybe I should be posting in the php section?

I am certain I need a <div= name off css menu> ul {code} </ul></div>

The code is what I am missing.

Thanks, Jim

#4 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 12 June 2006 - 01:24 PM

"Basic Site"? Where did you get this stuff that you don't seem to fully understand? This doesn't sound like a CSS problem, it sounds like a PHP thing.
Disclaimer: No matter how harsh I may be, I'm always IMO only.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users