I have a function that quick loops through the $sub_navigation array and adds the links and the markup based on a $section variable. This array is kind of big (via lines of code) and I don’t want to use it in my HTML, i.e.
I also feel that this is kind of dirty. It’s a little ambiguous to where $sub_navigation variable came from and I just want as little PHP code mixed into my markup as possible.
I use a header.php that contains the Main and Sub Navigations. I also don’t like the idea of doing this in header.php:
I could potentially move the sub-navigation.php include to be included right after I include header.php.
I only have so much time and flexibility to “improve” this so I can’t do anything too radical.
I am a self taught web developer. Now and then I run into trouble with code/application approaches or design patterns.
Any and all help and suggestions will be greatly appreciated.
Author
Posts
Viewing 1 post (of 1 total)
The forum ‘Other’ is closed to new topics and replies.