PDA

View Full Version : Trying to build new navigation...


sean088
07-21-2004, 11:44 PM
Hello, I'm trying to build some new navigation based on categories, and forums. I think if you see my html, you'll see what I want to accomplish:

<tr><td class="rootCategory"><a href="correct linking">Category 1</a></td></tr>
<tr>
<td class="subCategory">
&nbsp;<a href="correct linking">Forum 1</a><br>
&nbsp;<a href="correct linking">Forum 2</a><br>
&nbsp;<a href="correct linking">Forum 3</a><br>
</td>
</tr>And that will repeat for each category and it's forums. I only need to go as deep as shown, no need to show sub-sub-cats... I added an image attachment so you can see what I'm trying to accomplish.

I've looked around a bit, and I'm pretty much pulling my hair out right now (information overload I think). If someone could just get me started, that would be more than enough. :)

Thanks all!
-Sean

CarCdr
07-22-2004, 07:34 AM
Perhaps I do not understand what you are after, but vB has this capability. You can define a forum to be a category only -- a heading for other forums. When adding a category forum, set "Act as forum" to no. To add a forum to this category, select "Add Child Forum" from the "Controls" drop-down menu in "Forum Manager".

sean088
07-22-2004, 09:28 AM
Right, I'm already doing that. What I'm trying to build is a new navigation for it. My forums are enclosed by a custom header and footer, and I'd like the left navigation to contain the categories/forums. Similar to how they are displayed on the front page, but not quite that complicated. The image I attached in the post above is what my left navigation looks like...

CarCdr
07-22-2004, 10:02 AM
So you have a left HTML frame that should contain only the forum names and, for the names that are not simply categories, a user should be able to click the forum name and have that forum displayed in the right-hand frame?

You will want to use cache_ordered_forums to build the list of forums in the proper display order. Example:
require_once('./includes/functions_forumlist.php');
...
cache_ordered_forums();

The call to "cache_ordered_forums" without parameters specifies that you do not want any counters set and that you want only forums that are not invisible (i.e., active). After the call, the global array "$iforumcache" will contain the list of ordered forum information.

What you are doing is similar to constructing the forum jump drop-down menu. Take a look at the function "construct_forum_jump" in "includes/functions.php".