Subcategories not working as expected.
-
@julian Finally tested it out. It's perfect in term of organization it's so much better.
I still have a request though :
Is it possible for subcategories to have this information :
It could be in the clidren object as a table like it is for a category on home.
And theunread-class
attribute too.Why I'm asking this for is because I think the feature of viewing what's said in a category on the homepage should be present also on the categories pages. The reason is simple. If someone post in a subcategory the information doesn't go to the parent (which is perfectly normal) but when you're viewing what's inside you should be able to see if there's new content in a subcategory without loading it like it's done on the homepage.
I don't realize if this is a lot of work cause I think basically it's copying information that was previously here but unusable (subcategories that were displayed on home had this information).Thanks a bunch for what you've already done and I'm happy if I had provide some help.
I think we're near the best thing for subcategories now and that was a needed feature for future versions of NodeBB
-
@julian said:
Keep in mind that I implemented the display of subcategories inside of the category view, so this may have been a duplication of some of the work you did.
I didn't see such "display of subcategories inside of the category viewβ after I installed 0.5.1.....
(may be the following code is not the latest?)
category.tpl
<div class="subcategories">
<!-- BEGIN children -->
<!-- IMPORT partials/category_child.tpl -->
<!-- END children -->
</div> -
@julian said:
@miluo said:
<div class="subcategories"> <!-- BEGIN children --> <!-- IMPORT partials/category_child.tpl --> <!-- END children --> </div>
This is all I added, so if that works for you, then great!
I'm currently working on a way of displaying the sub categories on the home page too. If I come up with something that looks ok. I'll PR it for your approval.
Something like this, but better. Maybe have them before first post teaser instead.
-
@baris said:
@a_5mith IMO they should go under the category name and description, since they are sub categories having them above the main category makes them look like they are more important.
Look at Baris with his logical approach to things. I'll see what can be done.
EDIT: Still a bit of styling left to do. But something like this?
-
The funny thing is, I haven't. I'm not sure what's going on with that. I'll look into it.
I'm making those edits to NodeBBs forum at the minute through the console. Did notice a forum update. So will copy it over to my testing server and edit there.
-
@Developers, is there a reason why the template gets parsed on a cold load, but not when you then go back to the home page?
Code I'm using is basically the same as it is in category.tpl, except I'm calling a new file called category_child_home.tpl instead of editing core template.
EDIT: See here http://a5mith.kd.io:4567/
-
@miluo said:
when user read the posts for a category A, maybe better include those posts from subcategories of A ?
So you mean when a user hovers on a sub category on the homepage, it switches the preview to posts in those child categories? Not sure teasers are included in in the child categories. Could get a bit confusing.
-
@a_5mith said:
@miluo said:
when user read the posts for a category A, maybe better include those posts from subcategories of A ?
So you mean when a user hovers on a sub category on the homepage, it switches the preview to posts in those child categories? Not sure teasers are included in in the child categories. Could get a bit confusing.
No -- I mean when user click on a category X and go to the page for that category -- there are 2 parts - 1) list of sub categories ; (2) list of topics for category X ( I mean should the topics include topics created in the subcategories of categoryοΌΈοΌ).
from UI perspective, it's fine for homepage use lavender theme style, but for the category page with subcategories, the style of many boxes on top of list of topics seems not good.... better make the list of sub-categories very light for example just a list of text links.....