1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RM 1.2 How to make a category heading for subcategories.

Discussion in 'Resource Manager Support' started by Mr Lucky, Aug 23, 2015.

  1. Mr Lucky

    Mr Lucky Well-Known Member

    I have grouped three categories as subcategories under one main category.

    I don't want people to create resources in the main category, just the subcategories, ie it just appears as a category heading (like a category in the main node tree)

    Yes, I can make it so people can't create resources there, however when they click on it, it just appears like any category (it has the list of resources available in is subcategories) but without the Add Resource button.

    This is not good because it is not at all obvious that they then need to click on a subcategory to post.

    What is the best way to achieve this category headings then that makes it obvious to users?

  2. Chris D

    Chris D XenForo Developer Staff Member

    For that category, if you uncheck all of these:


    Then the category will behave like this one: Add-ons | XenForo Community

    You can't add resources to this category, but instead of it saying there are no resources to display, it instead displays all resources from the child categories. It displays the following heading above the list of resources: "Resources are being shown from all child categories".
  3. Mr Lucky

    Mr Lucky Well-Known Member

    Exactly my point.

    It is confusing because people don't know they must then click on one of its subcategories.

    And the text you mention is tiny and faint.

    Screen Shot 2015-08-23 at 14.53.58.png

    I think to be consistent this should work like category headings for forums.
  4. Chris D

    Chris D XenForo Developer Staff Member

    Never heard it called confusing before.

    This is the only solution currently but maybe you would be able to style it accordingly to make it less confusing.
  5. Mr Lucky

    Mr Lucky Well-Known Member

    You have now :) OK, but do you not see my point, that it would be good to have consistency about the way things work here?

    Is there a conditional I can use to add content to just a specific resource category then?

    Or a way to get a notice on just that category?
  6. Chris D

    Chris D XenForo Developer Staff Member

    I have indeed. I don't currently see the need for any consistency here. It's a unique type of content so I don't see it needs to be compared or made equal to forums and categories. Just our opinion, of course. It might be an idea that's worth fleshing out and creating a suggestion for. It's not currently completely clear exactly what would need to happen to make it less confusing or more consistent.

    Something like:
    <xen:if is="{$resource.resource_category_id} == 999">Something</xen:if>
    Where 999 is the desired category ID to affect. Depending on which template it is, you may need to swap $resource for $category.
  7. Mr Lucky

    Mr Lucky Well-Known Member

    1) Make it a purely heading in the category list, showing above the subcategories, not a link.
    2) Keep as, but it would automatically disallow any resources and show on the page the list of subcategories you can post resources into:

    Add Resources to any of these subcategories:
              • Subcategory 1
              • Subcategory 2
              • Subcategory 3
              • Subcategory 4
    So when you create it you get the option to create category header (just as you get the option in Node Tree to create category/forum/page etc)

    yes, maybe it needs more thinking through but I know this would be easier for newbs.

    Many thanks. I'm trying that but cannot find where to put the text.

    I assumed it would be in resource_categories template? But that doesn't seem to work.

    can you please say which template I add it to (I want it to appear just under the h1 header.

  8. Mr Lucky

    Mr Lucky Well-Known Member

    NB: just found a bug with indents - those two extra bullets appeared only after I edited a typo lower down the post.
  9. Chris D

    Chris D XenForo Developer Staff Member

    The suggestion would be better off posted in the RM Suggestions forum.

    I suspect you want the resource_index template.
  10. Mr Lucky

    Mr Lucky Well-Known Member

    No, it does seem to be resource_category but the conditional doesn't work. It shows fine without the conditional (but in all categories of course).

    I have changed it to the correct category ID, but just not showing.

    Any idea what could be wrong?
  11. Chris D

    Chris D XenForo Developer Staff Member

    What's the exact code you're using?
  12. Mr Lucky

    Mr Lucky Well-Known Member

    <xen:if is="{$resource.resource_category_id} == 16">Test extra text</xen:if>
    Category ID from:

    Screen Shot 2015-08-23 at 16.19.10.png
  13. Chris D

    Chris D XenForo Developer Staff Member

    Mr Lucky likes this.
  14. Mr Lucky

    Mr Lucky Well-Known Member


    [​IMG] [​IMG] [​IMG]
    Chris D likes this.

Share This Page