Is it possible to hide the tag selector drop down from the home and category pages and have it appear only when users have driven down to the subcategory page?
do anyone know how to do this please?
Is it possible to hide the tag selector drop down from the home and category pages and have it appear only when users have driven down to the subcategory page?
do anyone know how to do this please?
That is a lot harder. You can easily only have it show on category pages, but limiting it to sub-categories would be difficult and require regular maintenance when you add a parent category.
It would look like
ol.category-breadcrumb li.tag-drop {
display: none;
}
body[class*='category-parentName1-'] ol.category-breadcrumb li.tag-drop {
display: list-item;
}
body[class*='category-parentName2-'] ol.category-breadcrumb li.tag-drop {
display: list-item;
}
body[class*='category-parentName3-'] ol.category-breadcrumb li.tag-drop {
display: list-item;
}
Replace parentName1, parentName2, parentName3 with the parent category slug.
You should see the smile on my face.
excellent work mate, i’m humbled, thank you very much.
The problem now is, when you select a tag, there’s no way to change it as the dropdown has gone , even if you go to another category or subcategory from the dropdowns, the tag is still selected.
i guess i need a reset search button in the top menu, i think i read somewhere about custom options for the top menu, i will look into it, other than that i suppose a reset button button could be something similar to clicking the logo and going back home.
that’s my homework, unless you know a solution?
Ah, yeah I could see that happening. I’m not sure of the best course of action to remedy that at this moment. I somewhat wonder if the tag selection should reset when the categories are changed… But that’d be a question for the Discourse Team.
Edit:
I think I misinterpretted the initial concern, so I don’t think anything needs to be looked into by the Team.
yeah, something of a loop. I was hoping i could use the code you supplied from my other question, something along the lines of;
body.tags-page #tag-drop {
display: list-item;
}
almost?
Oh, that might work. But instead of #tag-drop, you’d use .tag-drop (note the period)
no dice, i’m afraid.
Maybe try this. I’m away from my physical computer right now, so trying to do this via mobile, which isn’t easy.
body.tags-page ol.category-breadcrumb li.tag-drop {
display: list-item;
}
Edited:
Updated, as I forgot the ‘s’ in tags-page
you’ve only gone and solved it my man
the tag drop now shows on the tag page, but like you said earlier, even if you change ‘tags’ to ‘none’ and select another category the selected ‘tag’ is still associated with the new category.
It could indeed do with resetting if you change categories. I guess i could ask one of the team about it.
Well played though, brilliant work.
the url changes like this:
select category: ***.uk/c/spare-rooms
select subcategory: ***.uk/c/spare-rooms/cambridgeshire
select tag: ***.uk/tags/c/spare-rooms/cambridgeshire/none
select a different category: ***.uk/tags/c/spare-stuff/none
Okay, so yeah, that should probably get the input from the Discourse Team, as I don’t know what the actual intent is there.
Good directions on how to reproduce it.
This topic was automatically closed after 2789 days. New replies are no longer allowed.