Layouts Plugin

Indeed, this is an issue I’m working on atm :slight_smile: Note that you can also disable fixed positioning via a site setting.

I’ll take a look at that widget, thanks.

1 Like

Continuing the discussion from Sidebar with categories:

I posted that question :arrow_up:︎ in the Sidebar with categories Plugin discussion.

I’m wondering how difficult it would be to customize that or write some custom code/plugin/theme component to allow extend that functionality and offer a nested folder type view of the categories and sub-categories.

Specs:

I want the Categories listed in the Sidebar menu to show the main categories and Categories with Sub-Categories would clearly indicate this. then when you click on one, it shows the sub-categories. And the last key functionality is that no matter where you are in the forums, the sidebar would indicate the source/location of the active discussion that you are viewing.

e.g. So if someone visits our forums from an organic google search, and end up viewing a Topic in a Sub-category, we want them to see that they are in a Sub-category, within the main Category.

Not sure how difficult it would be to develop this and/or what the cost would be, but if anyone can help with this, please let me know!

3 Likes

Hey :slight_smile:

This is very similar to what we have on thepavilion.io

This is achieved via the Layouts Plugin + Layouts Category List Widget.

Screenshot at Jul 20 15-09-39

8 Likes

I love this setup, and it’s exactly what we were looking for! I installed the Layouts Plugin and then installed the Layouts Category List (using the ProCourse Installer) and I see all the Layouts settings. But I’m not sure how to turn on the Layouts Category List widget.

Here's our current settings (screenshot)

After installing the Category List Widget should we be seeing that in the Widget dropdown list, after installation?

Here’s what we’re seeing now…

You can look at our forums to see that the 250px sidebar is working… but I just don’t know how to get the category List to show up… https://forums.pickleballist.com

@angus do you have any idea what I’m missing here?

I’m not sure how to get the Category List Widget to show up, after installing. :thinking:

Hold tight. I’m writing up a full set of documentation for this plugin which will make this clearer. I’ll ping you in the plugin topic in the next day or so when it goes live.

5 Likes

Thank you so much!! :raised_hands: I was going to suggest that you add the Category List Widget to the other sample widgets in the OP but it sounds like you’re already updating it! Thanks for sharing your work with the community!!

2 Likes

There’s now a full set of documentation for this plugin :tada:. You can find it all here

I’ve also updated the OP of this topic with various links and descriptions

7 Likes

Can this be used to create a sidebar that only pops up when moving the mouse to the left edge? That is, there is no fixed sidebar always visible on the screen. The advantage of this is that the sidebar pops over your window and hence, does not displace any of the elements. The issues with sidebars is always been a real-estate with taking up a fraction of the space on the screen.

Even similar to the windows taskbar, having it on auto-hide is nice because then other programs are not displaced by the height of that taskbar.

I have the Layouts and Category List plugins. I know how to add widgets to customize my sidebar. The only thing I’m requesting is for the ability for that sidebar to auto-hide.

Even Flarum has this feature natively installed:

1 Like

Yes, you could create that using this plugin. It’d need to be a new widget, packaged in a theme component. If you’re keen on developing it yourself, let me know and I can help you out / mentor you. Or you can always hire Pavilion to develop it.

2 Likes

Not at this moment. I’m still new to Discourse. I have to learn how to make a plugin first. I’ll likely develop some elementary plugins first like adding custom bbcodes or buttons to the composer. I do think that this feature would be useful for many users though.

2 Likes

Cool, well if you’re keen, I’ve just added the first version of the Layouts Widget Development Guide to the documentation

3 Likes

This helps with developing a new widget, but I’m still not sure how to auto hide the sidebar which maybe is CSS related.

1 Like

I’m using this plugin and its great once it is customized. It’s not yet collapsible but I can live with that. I wanted to choose which categories I wanted the sidebar. I didn’t want it on my homepage so I didn’t want “all categories” for my widget. I chose the “Category List” as the widget.

However, whenever I chose anything but the “all categories”, it will not accept it and just spend an infinite time loading.

I put in the red box the circle that just keeps loading. I tried refreshing, clearing cache, and multiple things to try again, but it would not accept it. I tried disabling and enabling the plugin.

To reproduce:

Simply choose 1 or more categories that’s not “all categories” from the Category List Widget.

Thanks, I’ve fixed this issue :+1:

https://github.com/paviliondev/discourse-layouts/commit/6f9cef968c9790655497a606de19a5d40c22de8d

I’m updated the plugin but I still have the same issue. If adding multiple categories, it will won’t accept it and just keep loading. You should try testing by adding 5 or more categories without picking all categories to reproduce.

Please make sure you’re on the latest discourse and plugin and you’ve refreshed the page. It’s working on the latest discourse.

See for example: https://try.thepavilion.io/

1 Like

Thanks it works now. If only it were collapsible (appears on moving the mouse to the left edge), it would be perfect.

1 Like

Is there a way I can choose not to show the sidebar on the homepage ? I selected specific categories where I want the category list widget to be displayed and it does that, but it also shows it in the homepage, which I don’t want. The homepage being forum.mydomain.com since the default discourse homepage already has default navigation shown, it does not need a sidebar.

Note after the most recent update of Discourse, the sidebar doesn’t show anymore. I have all plugins updated and I’m on latest version.