There is a quirk with this method where the custom div
disappears when toggling the visibility of the sidebar, for example if the browser window is narrow. This is a problem especially for tablets, which usually get the desktop version of Discourse and require clicking on the hamburger menu to display the sidebar. Any possible workarounds? Thanks!
Edit: Solved here:
@Ryan_Hyer Very nice! You figured out the way to make the items appear (or continue appearing) after the hamburger toggle event, which was the problem I was running into here:
I also was able to hack your code into displaying what I want in the Community menu without being hidden under More:
Head:
<script>
const links = [
// FontAwesome icons may need to be added in the site settings if they don't correctly appear
{ title: "User Directory", src: "/u?asc=true&cards=yes&order=usernamâŚ
1 Like
bquast
(Bastiaan Quast)
February 26, 2023, 6:03pm
82
Thanks @hosch and @Olivier_Lambert for making this.
Could you please explain to this newbie where I should insert this?
1 Like
bquast
(Bastiaan Quast)
February 26, 2023, 6:05pm
83
How can I reorder elements in a sidebar / hamburger-menu section?
E.g. I want to put âAll categoriesâ above the categories in the âCategoriesâ section, same with âAll tagsâ.
Thank you!
1 Like
Jagster
(Jakke Lehtonen)
February 26, 2023, 6:09pm
84
You know now how to use a component for CSS, right? Add that on head-section.
You canât easily. Yet anyway. It is no totally finished and polished at the moment.
2 Likes
bquast
(Bastiaan Quast)
February 26, 2023, 7:20pm
85
Jakke Lehtonen:
Add that on head-section
I tried this, it gave me an error on using a semicolon near src
.
Let try again. Tnx
1 Like
MarcP
(MarcP)
March 1, 2023, 12:47am
86
MarcP:
I use internal links in this component, for example, I have a link that opens user invites: /my/invited/pending/
When opening the link from the sidebar I get: Oops! That page doesnât exist or is private.
This is still a thing, the solutions after did not fix the issue.
Setting: Invite friends,/my/invited/pending/,f
Off-topic:
Alex Sirota:
image1920Ă1032 126 KB
I saw this condensed sidebar styling before, I canât seem to find it anywhere. Is this a theme component?
1 Like
Canapin
(Coin-coin le Canapin)
March 7, 2023, 12:58pm
87
You can use this CSS:
#sidebar-section-content-categories,
#sidebar-section-content-tags {
display: flex;
flex-direction: column;
li:last-child {
order: -1;
}
}
8 Likes
Richie
(Richie Rich)
September 7, 2023, 6:58pm
90
Weâve just had to change our navigation menu setting from âLegacyâ to âHeader Dropdownâ, before itâs enforced on us:
Most of our custom hamburger menu links have now disappeared, and the two remaining links are both broken
Does this theme component support the new navigation @Johani ?
Hereâs how our burger menu used to look under the âLegacyâ option:
Hereâs how how it looks under the âHeader Dropdownâ option:
Notable differences:
Broken Link: Insurance
Broken Link: Membership
Missing: Drone Scene
Missing: Good 2 Go
Missing: Competitions
Missing: Drone Code
Any advice or support would be very much welcomed
1 Like
Richie
(Richie Rich)
September 7, 2023, 7:01pm
91
If it helps re the broken links, one example used to point to:
https://example.com/faq#insurance
But when you click on it now, under this new menu system, it now sends you to:
https://example.com/https://example.com/faq
1 Like
Richie
(Richie Rich)
September 7, 2023, 7:11pm
92
@Canapin did you ever find a solution to your problem back in October 2022?
It might be the same problem weâre now facing.
1 Like
Canapin
(Coin-coin le Canapin)
September 7, 2023, 7:23pm
93
I believe this component is/will be discontinued since you can now add custom sections /links to your sidebars
1 Like
Richie
(Richie Rich)
September 7, 2023, 7:38pm
94
We changed from âLegacyâ to âHeader Dropdownâ as itâs the least disruptive, can we add custom links to the Header Dropdown menu?
1 Like
Lilly
(Lillian)
September 7, 2023, 7:40pm
95
Yes, click/tap the â+â icon at the bottom of the drop down menu to create new custom sections. it should be right beside the keyboard shortcuts button. to edit sections, click the pencil icon beside the menu section header.
1 Like
Richie
(Richie Rich)
September 7, 2023, 7:42pm
96
Dâoh
Thanks @Lilly - I saw that and assumed it was for each user to customise their own menu
Iâll take a closer look at it now.
1 Like
Lilly
(Lillian)
September 7, 2023, 7:47pm
97
It is for both. As admin you get to see the Make this section public and visible to everyone
checkbox at the bottom of the new custom menu section modal. if you donât enable that, it is your personal menu. if you enable it, it is a global one.
Also, it looks like my menu customizing theme components work in drop down mode (just tested them).
1 Like
Richie
(Richie Rich)
September 7, 2023, 7:50pm
98
Brilliant.
Thanks @Canapin and @Lilly this is the fix we needed
Now I just need to submit a feature request to be able to target the external links to a new browser tab
1 Like
I think they should respect the âOpen all external links in a new tabâ user preference on your /my/preferences/interface
page:
1 Like
Richie
(Richie Rich)
September 7, 2023, 7:55pm
100
Ah, thatâs good to know, thanks James.
Iâm unsure what people will have that set to though
2 Likes
You can set the default using default other external links in new tab
And even apply it historically:
Though this would only update it for those that were still on the default. If theyâd changed it/changed it back/made a deliberate choice then it wouldnât override it as itâs assumed theyâve set it to be how they want it. It tells you how many users it will change it for though, so it gives you a rough idea.
1 Like
Richie
(Richie Rich)
September 7, 2023, 8:04pm
102
ManâŚ
You people are just amazing
Thank you so much, I think this now gets us back to exactly where we were before this setting change
1 Like