Tommy Bell

Tommy Bell

  • NA
  • 21
  • 0

Database driven menu and siteroot

Mar 4 2008 5:42 AM
Hello

I am attemping to create a datadriven menu, but I cant figure out how to do it, because as far as I can figure out, I have to use either a gridview og a List and i was hoping to get a menu that looks something like this.

<dl id="browse">
<dt>Menu</dt>

<dd class="first"><a href="">Point One</a></dd>
<dd><a href="">Point Two</a></dd>
			  <dd><a href="">Point Threee
</a></dd>
<dd><a href="">Point Four
</a></dd>
<dd class="last"><a href="">Om Laserdisken</a></dd>
using this CSS
#browse {
    float: left;
    width: 195px;
    margin: 0;
    padding: 0;
    background: white;
    border-bottom: 2px solid white;
}

#browse dt {
    background: #c80000 url(images/dt_bg.gif) bottom repeat-x;
    color: #fff;
    margin: 2px 2px 1px 2px;
    padding: 6px 0;
    text-align: center;
    font-weight: bold;
}

#browse dd {
    background: #227293;
    border-bottom: 1px solid #659db4;
    padding: 0;
    margin: 0 2px;
}

#browse dd a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    display: block;
    padding: 3px 22px;
}

But I can only get a pretty standard looking thing, of a list that just consist of

- Point One
- Point Two
- Point Three
and so on


Exactly what am I doing wrong here?
Also, I was attempting to do a sitemap, where one can see where on the page the user is,
for instance with
root->point one -> subpoint four

but to do this, I have to have an xml file with all the points defined in it, this wont do if I am using a database to contain my menu and all the content, and so on, so how would I do this?
If someone is able to point me in the right direction of what to read or where to read. Or just tell me how to do this, I would be greatefull.

Regards

Answers (1)