• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Default category

DiscoRoHan

New Member
AMS
Showcase
Hi,

Is it possible to set a default category to be selected when Showcase is clicked from the Navigation menu? Currently it will display all categories.

I'm using it for a reviews system so I'd like to be to display a specific category by default. The user should then be able to click through specific categories to filter through them.

Thanks,
Rob.
 
Not without a file edit (not something I'd recommend). You could possibly use the Nodes and Tabs addon, however, you'd lose the secondary link navigation.
 
@Bob - What do you mean by lose the secondary link navigation? Here is what I'm trying to do:

Showcase
Category 1: Garages (want to have the showcase navBar go directly to this category)
Category 2: Market (want to have a separate navBar link called "Market" go directly here)

I can create the links using Nodes as Tabs, but it is a "Link Node" for the Market tab. Therefor alerting (new items) does not work. Is there another way to do this that keeps the alerting and ability to see the common drop down items (Mark Viewed, Search, Your Items... etc?)

Thanks,
Josh
 
One alternative would be to have the drop down menu for showcase show "child" Categories similar to how Nodes and Tab's works. Is there a way to do that? (assuming alerting works for that)
 
What do you mean by lose the secondary link navigation?
the secondary navigation is part of a TAB, so if you HIDE a tab that has a secondary nav, you won't SEE that secondary nav as its part OF the Tab. The last time I checked, the Nodes as Tabs wasn't able to use another tabs secondary navigation links (you'd have to ask the addon developer how THEIR addon works).
 
@Bob OK - Is there a way outside of using a link node to have a navBar link directly to a specific category (I realize it may not have the secondary nav) that will still work with the xenforo alert system. I.e when new items are added etc? (Same question for Articles.. which I'm just now starting to play with).

BTW - really nice addon's, once you understand one that knowledge seems to roll over to the other one.
 
that will still work with the xenforo alert system
Im not sure what you mean by this? What do you mean works with the XenForo Alert System?

Maybe you are you talking about the Unread Items Count on the Navigation Tab? If so, that has nothing to do with XenForo Alerts. That is a special attribute of the XenForo Navigation Tabs listener called 'count' that addons can programatically fetch a count of Unread/Unviewed Items and display that count on the Navigation Tab.

Addons create their own Navigation tab via extending the navigationTabs listener. As you can see in the below code, I am checking to see if the viewing user has any unread showcase items and if they do and they have the counter enabled, its going to add a 'counter' key to the extraTabs array which XenForo uses to add an Item Count to the Navigation Tab.

PHP:
    public static function navigationTabs(array &$extraTabs, $selectedTabId)
    {
        $visitor = XenForo_Visitor::getInstance();
        
        if ($visitor->hasPermission('nfljsc', 'viewShowcase'))
        {
            $options = XenForo_Application::getOptions();
                
            $extraTabs['showcase'] = array(
                'title' => new XenForo_Phrase('nflj_showcase_menu_main_tab'),
                'href' => XenForo_Link::buildPublicLink('full:showcase'),
                'position' => $options->scNavTabPosition,
                'linksTemplate' => 'nflj_showcase_tab_links'
            );
                
            if ($options->scItemsUnviewedCounter['enabled']
                && $visitor->showcase_unviewed_items_count
                && XenForo_Application::isRegistered('session')
            )
            {
                $session = XenForo_Application::get('session');
                $itemsUnviewed = $session->get('showcaseItemsUnviewed');
                    
                $extraTabs['showcase']['counter'] = is_array($itemsUnviewed) ? count($itemsUnviewed['unviewed']) : 0;
            }
        }
    }

I think what you are asking is the same thing that others have asked about which is MULTI INSTANCE functionality (A Category that acts as its own instance). That would require custom development.
 
@Bob - correct, I was talking about the "count" system. I thought that was part of the alerting system. Thanks for the code, helps me understand it better.

Regarding: "I think what you are asking is the same thing that others have asked about which is MULTI INSTANCE functionality (A Category that acts as its own instance). That would require custom development."

Essentially yes, I essentially wanted to make 1 Category a "home page" for Garages and a different "Category" a home page for Market. I think I have figure out a work around. Not ideal, but it may work. When I get it a little closer I'll send you a link and see if you have any ideas (if you have time/interest in looking).

As always - thanks!

Josh
 
Back
Top