perl - How do you generate website navigation? -
I'm interested in how other people handle website navigation is not part of the style or applicability, but part of the generation Most websites have a type of "navigation tree" that is displayed as one or more menu levels - in what form do you save and process this tree? The simple solution is a stable menu template, something like this:
& lt; Ul id = "menu" & gt; & Lt; Li & gt; & Lt; A href = "..." & gt; A & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "..." & gt; Two & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "..." & gt; Three & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;
But this is not very flexible. You can not easily mark the current page in the menu and there is no easy way to show or hide a part of the menu tree depending on the current page. (Or is this?)
I came up with a navigation tree, something like this:
- Title: fruit nodes: - Title: apple - title: orange - title: banana - Title: Music and Content URL: Music Nodes: - Title: Classic - Title: Jazz
This tree is loaded by a special navigation
class on parts of the navigation Depending on the current request path, it works a bit better, but still I have other people Sector'm very curious about the solutions.
MySQL deserves an article which I have found earlier that it is invaluable, this dynamic navigation and its boundaries Discusses two common techniques for storing.
Comments
Post a Comment