Im basically working on a site in which I want to display a menu bar on every page. As this site will be built with many pages i feel it would be easier to simply create a function with the menu bar inside it. I have a few questions which i would appreciate if someone could answer.
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">about</a></li>
</ul>
Let say I have this code above. would i simply be able to do:
function menu ()
{
<li><a href=#>Home</a></li>
<li><a href=#>about</a></li>
</ul>
}
and call the function on specific areas on the page i want it to be displayed. after requiring that file name.
Also curious on if i can do if statements inside that function that display certain menu links depending on the outcome of the condition
Thanks