RM 1.2 How to make a category heading for subcategories.

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?

Thanks.
 
For that category, if you uncheck all of these:

upload_2015-8-23_14-48-22.webp

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".
 
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.webp

I think to be consistent this should work like category headings for forums.
 
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.
 
Never heard it called confusing before.

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?

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

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?
 
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?
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.

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

Something like:
Code:
<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.
 
It's not currently completely clear exactly what would need to happen to make it less confusing or more consistent.

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.


Something like:
Code:
<xen:if is="{$resource.resource_category_id} == 999">Something</xen:if>
Where 999 is the desired category ID to affect.

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.

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

I suspect you want the resource_index template.


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?
 
Perfect!

infinite-banana.gif
infinite-banana.gif
drinking08.gif
 
Back
Top Bottom