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.

Category Widget vs. Navigation

Discussion in 'AMS Support' started by MarenLBC, Jan 19, 2023.

  1. MarenLBC

    MarenLBC New Member AMS Showcase

    Sorry if this is not worded properly but I'm using the category widget and when I click a category the widget moves down in position and it's replaced by the Navigation block. Is there a way to only use the category widget? I'm styling the widget a specific way and want it to be persistent. Thank you for the great customer service you always offer Bob.
  2. Bob

    Bob Developer Staff Member

    The "Navigation" Block is not a widget, it is a sideNAV block that is part of an action in a controller (and has behaviors based on if its on AMS Index or AMS Category pages). This block is actual template code as part of the xa_ams_index template as well as the xa_ams_category_view template. The Navigation block can easily be removed or commented out tho (simple template edits).

    AMS does include a Widget Definition that allows you to create category navigation widgets, which was originally designed for use outside of AMS, like on Forum Home for example and for Modular Index, but can also be used on AMS sidenav and sidebar positions (altho, the behavior of category widget is NOT the same as the behavior of the more complex Navigation sidenav block, especially on Category Pages).

    Hit me up in Conversation so I can walk you through removing the Navigation block(s) from specific pages :)
  3. MarenLBC

    MarenLBC New Member AMS Showcase

    Oh that makes sense. I thought the Category Widget was made specifically for use in AMS Modular. So when I had it active it became redundant once a category was selected. I think explaining what I'm trying to accomplish would be better. I want the categories on the left side but I want them to not have a BG or a Header. I have a style made specifically for AMS BTW so I'm not concerned about making any changes to the style that impacts other lists, nav, etc. Thanks.

    Screen Shot 2023-01-19 at 9.52.30 AM.png
  4. Bob

    Bob Developer Staff Member

    You'd have to edit the 'xa_ams_widget_category_nav' template to remove the header (line 3) as there are no unique classes that you can target to hide via CSS (altho, you can add your OWN classes)

    I am using Core XF classes (block, block-container, block-header, block-body) as well as the simple_category_list macro, which is core XF design (XFRM and XFMG both use the same macro).

    Adding your own classes and then using those classes with ! to override core XF would probably do the trick.

  5. MarenLBC

    MarenLBC New Member AMS Showcase

    Thanks man I did this before but I have the issue that when I click a category the SideNAV pops up. Would it make more sense to customize the SideNAV instead of the widget?
  6. Bob

    Bob Developer Staff Member

    Both use the same Core XF CSS classes.

    If it's the WIDGET, you need to edit the widget template.

    If it's the Navigation SideNAV block, that is much more complicated as its using the xf:sidenav template tag (which is a wrapper that use Core XF CSS) as well as a macro (and modifying a macro effects everything that uses it).

  7. MarenLBC

    MarenLBC New Member AMS Showcase

    Thanks...so I'll just comment out the Navigation SideNAV. Should I comment out the area you highlighted above?
  8. Bob

    Bob Developer Staff Member

    You will need to comment out the Navigation Block in the sidenav in several templates.
    • xa_ams_author_view
    • xa_ams_author_list
    • xa_ams_author_drafts
    • xa_ams_author_articles_awaiting_publishing
    • xa_ams_category_view
    • xa_ams_index
    • xa_ams_series_index
    Yes, its all the lines of code in the highlighted area in all of the above templates.

    Example, at the end of the xa_ams_category_view template, you are removing the <xf: page 'sideNavTitle' option and the sidenav block just like on AMS Index. It will be the same in all of the above templates.

    Also, pay no attention to the widget position directly above the highlighted text, that is something NEW in the next release to display widgets below the article list.

    MarenLBC likes this.
  9. MarenLBC

    MarenLBC New Member AMS Showcase

    Bob likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.