Custom Hamburger Menu Links

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:

1 Like

Thanks @hosch and @Olivier_Lambert for making this.

Could you please explain to this newbie where I should insert this? :pray:

1 Like

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

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

I tried this, it gave me an error on using a semicolon near src.

Let try again. Tnx

1 Like

This is still a thing, the solutions after did not fix the issue.

Setting: Invite friends,/my/invited/pending/,f

Off-topic:

I saw this condensed sidebar styling before, I can’t seem to find it anywhere. Is this a theme component?

1 Like

You can use this CSS:

#sidebar-section-content-categories,
#sidebar-section-content-tags {
    display: flex;
    flex-direction: column;
    li:last-child {
        order: -1;
    }
}

:slight_smile:

image

8 Likes

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 :pensive:

Does this theme component support the new navigation @Johani ? :thinking:

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 :blush:

1 Like

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

@Canapin did you ever find a solution to your problem back in October 2022? :thinking:

It might be the same problem we’re now facing.

1 Like

I believe this component is/will be discontinued since you can now add custom sections /links to your sidebars :thinking:

1 Like

We changed from “Legacy” to “Header Dropdown” as it’s the least disruptive, can we add custom links to the Header Dropdown menu? :thinking:

1 Like

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. :slight_smile: to edit sections, click the pencil icon beside the menu section header.

1 Like

D’oh :man_facepalming:

Thanks @Lilly - I saw that and assumed it was for each user to customise their own menu :man_facepalming:

I’ll take a closer look at it now.

1 Like

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). :thinking:

1 Like

Brilliant.

Thanks @Canapin and @Lilly this is the fix we needed :smiley:

Now I just need to submit a feature request to be able to target the external links to a new browser tab :slight_smile:

1 Like

I think they should respect the ‘Open all external links in a new tab’ user preference on your /my/preferences/interface page:

Open all external links in a new tab

1 Like

Ah, that’s good to know, thanks James.

I’m unsure what people will have that set to though :blush:

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:

1 Like

Man…

You people are just amazing :clap: :bowing_man:

Thank you so much, I think this now gets us back to exactly where we were before this setting change :smiley:

1 Like