welcome ,
i want to create dynamic menu that depends on database' tables that i will use it to create cms
i attached an image as an examlpe
can any one help me please
how to create dynamic menu from database for cms
Moderator: General Moderators
-
egyptcoders
- Forum Newbie
- Posts: 3
- Joined: Wed Aug 04, 2010 5:13 am
how to create dynamic menu from database for cms
- Attachments
-
- cms.png (18.01 KiB) Viewed 125 times
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: how to create dynamic menu from database for cms
Well, what kind of database structure are you dealing with? How is the parent-child relationship established? How far have you gotten?
-
egyptcoders
- Forum Newbie
- Posts: 3
- Joined: Wed Aug 04, 2010 5:13 am
Re: how to create dynamic menu from database for cms
i deal with mysql database
this example i not created and also donnot know how it is created , so i asked here
very thanks for you
this example i not created and also donnot know how it is created , so i asked here
very thanks for you
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: how to create dynamic menu from database for cms
To create a tree structure of similar elements, you'd just set up a parent-child relationship in the main table.
Code: Select all
`navigation_links` table
ID | Parent_ID | Name | URL
1 | 0 | Parent1 | #
2 | 0 | Parent2 | #
3 | 2 | Child1 | #
4 | 2 | Child2 | #
5 | 4 | Child3 | #
6 | 0 | Parent3 | #Code: Select all
+ Parent1
- Parent2
+ Child1
- Child2
+ Child3
+ Parent3-
egyptcoders
- Forum Newbie
- Posts: 3
- Joined: Wed Aug 04, 2010 5:13 am
Re: how to create dynamic menu from database for cms
thanks , but there is no main table i use
these elements are created automaticaly from database tables , i will need to create a file that organize this structure from the database
so , each table ia an element that i cat set title and href for it , also i can add childs with title and href and so on
these elements are created automaticaly from database tables , i will need to create a file that organize this structure from the database
so , each table ia an element that i cat set title and href for it , also i can add childs with title and href and so on
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: how to create dynamic menu from database for cms
So, you want us to tell you how to deal with a database table that is already created, yet you have no idea what it looks like and can provide no details as to how it's structured?