Externalize navigation?
Posted: Sun Aug 22, 2010 8:13 pm
Working on something to try out the "new" child themes, a thought crossed my mind: Isn't it about time we put the feature to create a navigation (like in BP and other templates) into a plugin or maybe even the core?
Here's why this crossed my mind: What happens if I implement the navigation (the way we use it now) in an engine template, but not in a child template depending on that engine? I assume there would be some kind of "side effect". On the other hand, it would be a limitation denying engine templates the ability to have a navigation (the way we use it now) given the fact that any engine template might as well be used as a theme itself.
It would be great if template authors would be able to use some kind of statement like "if navigation plugin is active, insert navigation here" in .tpl files. That way, the navigation wouldn't even have to be a sidebar plugin -- template authors could just plug it into the index.tpl or sidebar.tpl. BTW, this functionality would also be great to have for the search form. Both navigation and search form are very common in blogs these days, but it's debatable whether either one of them should be limited to being emitted in a sidebar. (Of course, that's already possible for the search form, but it involves a lot of typing.
)
While I'm at it, here's another cool idea (in my humble opinion at least): Of course, users should still be able to configure the number of links in a navigation and the link text. How about if they could also select for any given item which "type of link" it should be. Types of links I could think of so far would include:
1. home page
2. a blog category (selected from a select box listing all categories)
3. a static page (selected from a select box listing all pages)
4. the archives page
5. any page created by plugins (contact form, download manager etc.)
6. custom link (i.e. link to external URLs)
Unfortunately, I can only present the idea and help with the HTML/CSS for this, and I realize that it would probably be a lot of work to implement this, especially the "type of link" thing. Also, backwards compatibility remains an issue because of all the templates which already have a navigation implemented the way we use it now. But I think this would really rock.
YL
Here's why this crossed my mind: What happens if I implement the navigation (the way we use it now) in an engine template, but not in a child template depending on that engine? I assume there would be some kind of "side effect". On the other hand, it would be a limitation denying engine templates the ability to have a navigation (the way we use it now) given the fact that any engine template might as well be used as a theme itself.
It would be great if template authors would be able to use some kind of statement like "if navigation plugin is active, insert navigation here" in .tpl files. That way, the navigation wouldn't even have to be a sidebar plugin -- template authors could just plug it into the index.tpl or sidebar.tpl. BTW, this functionality would also be great to have for the search form. Both navigation and search form are very common in blogs these days, but it's debatable whether either one of them should be limited to being emitted in a sidebar. (Of course, that's already possible for the search form, but it involves a lot of typing.
While I'm at it, here's another cool idea (in my humble opinion at least): Of course, users should still be able to configure the number of links in a navigation and the link text. How about if they could also select for any given item which "type of link" it should be. Types of links I could think of so far would include:
1. home page
2. a blog category (selected from a select box listing all categories)
3. a static page (selected from a select box listing all pages)
4. the archives page
5. any page created by plugins (contact form, download manager etc.)
6. custom link (i.e. link to external URLs)
Unfortunately, I can only present the idea and help with the HTML/CSS for this, and I realize that it would probably be a lot of work to implement this, especially the "type of link" thing. Also, backwards compatibility remains an issue because of all the templates which already have a navigation implemented the way we use it now. But I think this would really rock.
YL