L3010
New Member
Posts: 49
inherit
264353
0
Mar 4, 2023 7:57:32 GMT -8
L3010
49
May 2021
l3010
|
Post by L3010 on Aug 8, 2021 7:32:02 GMT -8
Hi! does anyone remember seing the topic of categories inside categories on the BP-support forum before?
My idea: Inside a board, (Home, "Category-x" > "Board-x") i want multiple views for sub-boards, similar to the categories at Home, rather than the default container with the title "Sub-Boards".
Does anyone know if this has been done before and does anyone know if there is a plugin for this?
In case there is no plugin, how would someone go about "categorizing" Sub-Boards – that is, rather than displaying all Sub-Boards inside a container using $[board.sub_board_list] (in the "Board" Layout Template), displaying some in one container and others in another container.
is there a PB-variable to display individual Sub-Boards in a container (in the "Board"-Layout template)? Would $[board.sub_board.content_id] work?
Thanks, Leo
|
|
Kami
Forum Cat
Posts: 40,201
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,201
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Aug 8, 2021 8:02:25 GMT -8
Short answer: no, this has not been done, there isn't a plug-in for it, and there is no single variable to make it happen.
Longer answer: in theory you could cobble something together, however this would be incredibly long, tedious, and manual because you'd basically have to recreate every single subboard listing through HTML. I don't have an opinion on the merits of your idea itself, but I can say that the reason this isn't inherently possible is because it's not how the forum hierarchy structure works (categories are a top level container for boards, not a way to classify all content). If that still interests you I can walk you through the broad strokes method of how to accomplish this, but a) you'd have to repeat it for every single subboard including repeating it if you add a new subboard later down the road, and b) it would eat into your total amount of character that can be housed in the templates so if you have a lot of subboard you could wind up hitting that maximum.
|
|
L3010
New Member
Posts: 49
inherit
264353
0
Mar 4, 2023 7:57:32 GMT -8
L3010
49
May 2021
l3010
|
Post by L3010 on Aug 8, 2021 9:56:57 GMT -8
Yeah, if you want to start walking me thrugh it i would be happy
I've figured out how to make two duplicate "Sub-Boards"-containers. I've also figured out how to change one of them.
(I have changed the upper one, the duplicate, to a flexbox-container)
I'm thinking that maybe i can hide some boards (with JS?) in one of the containers and hide others in another container.
|
|
Kami
Forum Cat
Posts: 40,201
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,201
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Aug 8, 2021 12:15:48 GMT -8
Yeah, if you want to start walking me thrugh it i would be happy I've figured out how to make two duplicate "Sub-Boards"-containers. I've also figured out how to change one of them. (I have changed the upper one, the duplicate, to a flexbox-container) I'm thinking that maybe i can hide some boards (with JS?) in one of the containers and hide others in another container. There's two ways to go about it. You can just duplicate the subboard listing multiple times then show/hide using javascript as needed (which you seem to be able to do yourself(?); I'm not well versed in JS, so I can't help you with this method). The downside of this method is that JS is a client-side language so the show/hide of subboards would execute after the page is already fully loaded. Depending on your preferences & the number of subboards you have, this might not be an ideal effect. If you don't have a lot, this should be almost instantaneous and be nearly unnoticeable; if you have a lot though, this would be incredibly noticeable. The method I was going to suggest was utilising If/Else statements to target specific boards & subboards. You'd need to specify on Layout Templates > Boards > Boards (tab) which board's subboards are being targeted, then changing the layout in Layout Templates > Boards > Board List (tab) what the board layout looks like for those specific subboards utlising the board name or ID. You'd have to play around with the specifics, but it looks like you're comfortable enough to experiment? Let me know (:
|
|
L3010
New Member
Posts: 49
inherit
264353
0
Mar 4, 2023 7:57:32 GMT -8
L3010
49
May 2021
l3010
|
Post by L3010 on Aug 8, 2021 13:54:20 GMT -8
You are right. Flashing because of JS would not be nice.
Is your idea to code a container with sub-boards from scratch like this code? (for each board using if)
Attachments:
|
|
Kami
Forum Cat
Posts: 40,201
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,201
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Aug 8, 2021 14:12:03 GMT -8
You are right. Flashing because of JS would not be nice.
Is your idea to code a container with sub-boards from scratch like this code? (for each board using if)
Yeah basically! That way you'd have more finite control over what shows where without relying on javascript to show/hide as needed. The obvious downside here is that you only have a maximum amount of data that you can store per template, so if you have a buttload of custom modifications to make i'd go with the JS and just deal with the delayed hide to avoid having a truncated template because it's too big.
|
|