Remove topics listed under sub-categories that are also in the sub-categrories


(Blu McCormick) #1

I want to only display sub-categories under the wiki resource category. The idea is that members would click on the subcategory to find a particular topic. So far, playing with the settings I have not been able to figure out how to do this. Here is how it looks right now.

Any suggestions? Thanks in advance.


Users mistake top-level categories for lack of permissions
Make topics in sub categories, not appear in their main category
Users mistake top-level categories for lack of permissions
#2

Hey Blu,
Can you clarify what you mean? What don’t you want to display?


(Blu McCormick) #3

Sorry for the lack of clarity. See the topics at the bottom of the snapshot? I don’t want them displayed. I just want the subcategories displayed. To get to the topics in the Wiki, a member would select a sub-category that the topic they are seeking belongs to and find it in there. Does that make sense?


#4

It does. There is no way to do that using the UI because the purpose of that page is to list the topics. How would people see the topics that are in the parent category?


(Stephen Chung) #5

Sort of like using the parent category page as a landing page only without showing topics?

Not sure if it can be done right now because if you take away See permission on the parent, there is no way to get to the subcategories.


(Stephen Chung) #6

This would actually be a nice feature to add. Optionally showing the about topic as the landing page content. Disable showing topics list and force showing list of subcategories in one of the styles.


(Blu McCormick) #7

Ok, good to know @HAWK and @schungx .

Not arguing the philosophy behind not making this available, but just to let you know where I am coming from . . .my wiki topics logically can be found under their assigned sub-category so there is no need to individually list the topics underneath the sub-categories as well. In this wiki category, it’s messy looking to have the topics displayed as well as potentially confusing since you can find them in the sub-categories listed at the top of the wiki category. The reason I have those sub-categories is that people can easily find the type of resource they are looking for rather than skimming a long list of topics. If you look at the snapshot I supplied, you get the idea.

I can imagine how in a category where there are all sorts of topics covered you’d be better off searching that category as the way to find what you are looking for.


#8

I might not have been clear. If you remove the list, how would people get into topics from in the parent category (which aren’t listed under a sub-category)?


(Blu McCormick) #9

When I click on the parent WIKI category the sub-categories show. You can click on the subcategories to get to the topic you want to get to. Feel free to go to my website to try it for yourself.

As to what to do with topics not assigned to a subcategory, I simply have a sub-category assigned for every topic in the wiki.

I would only do this for the wiki and not my other categories.


(Blu McCormick) #10

Yeah, I’d love to have that ability, too, @schungx. It makes sense for categories listing resources.


#11

I guess the obvious question is why. If you had one category and many wiki topics you’d achieve the same thing, solve your existing issue and make the process faster for your users.


(Blu McCormick) #12

Not if you have many things belonging to one sub-category. In that case, it’s much cleaner and user-friendly if you have the sub-categories displayed with the grouped-topics under them. This is true for resources, more than conversational topics . For topics pertaining to resources everything tends to be logical and cut-and-dried in terms of what the topic is about so grouping topics under a sub-category is a logical step. My wiki (resource category) is at infancy stage, hence there are categories with one topic in them. The sub-categories will grow over time.

An advantage of sub-categories too is that the person can look at them like you would an index and see what type of resources are offered. It might not occur to our users to search for youtube “how to” videos for example but if they see that under the short list of sub-categories for useful resources, they will see that we offer that as a resource.


#13

I think I misunderstood you when you said “I simply have a sub-category assigned for every topic in the wiki”. That, coupled with your screenshot led me to believe that each sub-cat just housed one topic. If that’s not the case then what you’ve done makes sense. And if there will be no topics in the parent category then suppressing the list would be ok.

It’s not a setting though. I imagine you could do it using CSS. @awesomerobot ?


(Blu McCormick) #14

Argh. Wording is so important. Sorry for the lack of clarity, @HAWK . I confounded topic as used in discourse with topic as used in general. I’ll correct that in the original post right now.


(Sam Saffron) #15

Hmm are you asking for something like this?

It is probably going to require a fair amount of customization to get it to go, but technically is doable.


(Joe) #16

This is not tested thoroughly but since Discourse is nice enough to provide very helpful classes like so:

You can use this as a base

.categories-list.category-lcag-wiki:not(.staff) {
	#list-area,
	#navigation-bar {
		display: none;
	}

	.category-navigation {
		> button,
		> .category-notifications-button,
		.category-drop:nth-of-type(2),
		.tag-drop {
			display: none;
		}
	}

	.category-list {
		margin-top: 18px;
	}
}

Staff members will still see this:

While none staff members will see this:


(Blu McCormick) #17

Yes, @sam. I’d be looking for some variation of what you showed in your uploaded image, the specific goal being no topics showing under the sub-categories (the bottom material removed). I don’t mind the horizontal menu at the top, which is crossed out in your image.


(Blu McCormick) #18

That works beautifully, @lll. Thank you so much! And thank you also, @sam and @HAWK.


(Blu McCormick) #19

Hey, @lll.

What would I change in the css code if I want to do the same (no topics under subcategories) for a different category? I am thinking of doing the same in admin resources. It also might be useful as well for other non coders to know this. I think I can guess this answer but I might bolox it.


(Mittineague) #20

No need to worry. You can experiment to your heart’s content with your browsers developer tools and won’t cause permanent damage to anything. (eg. right-click -> inspect, or F12)

IMHO, CSS is one of those things that’s relatively easy to grasp the basics, but gets more difficult the fancier you try to get with it (eg, gradients, svg, transitions etc.)

A main limitation is the HTML. If the mark-up is invalid or a mess in general, you can have problems no matter how good you are with CSS.

In other words, it might not be possible to move things around, but changing the font, color, spacing, hiding, etc. usually work OK without breaking something else once you determine the best selectors to use.