Custom top navigation links

@Johani would it be possible to call a tag within a category, or two tags together?

the other use case would be finding a way to make this work with other plugins.

for example, the kanban plugin is housed at address like this: /c/web-developers/React-and-Meteor/l/latest?board=default

i can’t seem to make it load ‘l/latest?board=default’ based on a specific category or tag. Any help or insights you could offer would be greatly appreciated, as we’re going to try and code a solution this weekend if it doesn’t exist

I agree with others, this is great!

How would one go about getting the numbers in parenthesis for New and Unread in the last scenario you described?

So, just to rephrase, in regards to your example, I want to have the Movies category in the navigation and when I am at /c/movies and click “Latest” it should go to /latest and not /c/movies/l/latest. At the same time, I want to also have New and Unread and those should also be related to the high level (i.e. including all categories, not just Movies). When I add New and Unread to the component, it doesn’t show the numbers in parenthesis.

Thank you so much for in advance!

1 Like

What will be the URL if i need want to display “activity” page ?

Thanks

The url /my/activity will take the current user to their activity page

7 Likes

Awesome, it worked. Thanks

Hi,

But it shows “Activity button” by default on homepage in menu. I want it to be shown only when a user is logged in or else it shows page not found.

new menu option is as follows:
My Activity;All Activities;/my/activity

Right, I don’t think this component can show/hide a link based on whether or not a user is logged in.

You can do it with some CSS added to your theme…

html.anon {
  li[title="All Activities"] {
    display: none;
  }
}
3 Likes

You are awesome. It worked. Thank you sooooooooo much

Does anyone know how to get this to fire with relative urls rather than static ones?

That would mean it works with other plugins, so we could set a calendar, or kanban board that works for every tag-page and category to point to the kanban board or calendar.

Example:
When clicking ‘Board’ in a cateogry i want to visit:

instead i am taken to:

Discourse supports this as it works in other plugins and with the ‘latest’ tag. We want to allow users to choose between relative and absolute urls, so they can use it to navigate pages created by category or tag specific plugins and theme components

Another question: How would I go about having links that I added in the component (like Latest, Categories and Top) translated for users who change their interface language?
The translations are there without the component, so I guess it’s just a matter of linking the translations from core to the component?

1 Like

hello, i wanna build dropdown menu for sub category for parencategory via custom navigation link,
How can we add all of subcategory and display drop down for menu category link
Thank you!

How can we keep the navigation bar on for all post types? Currently, when we enter a post, then dis bar is closed.

btw, is there a way to set a navigation links that only appears on mainpage? (not in another categories?)

Also this seems won’t work for encoded urls, e.g. url with chinese characters. It can be fixed by adding

decodeURIComponent(window.location.pathname)

though.

Does anyone know how to carry the same navigation links layout on mobile instead of a dropdown.

image

1 Like