Navbar / Smart Active State / How is it triggered?

I use a linked navbar with "Smart Active State" turned on. I created a CSS entry to make the text of the active page bold:

.nav-link.active { font-weight: bold; }

So far so good, but not's not working.

The thing is, that my BS page names are different from what the nav-link points to. This is because I use the web-servers ability to serve pages in the correct language. So the link is contact.html for example, but the page actually is named context-en.html etc.

So, any idea what I need to change to make it work with as much default functionality kept as possible?

I would have to say that the tie is between the Link's page name and the actual page file name. Which is why when you changed that page files name from contact.html to contact-en.html the Smart Linking stopped working because you also didn't change the Nav link.

If your site is going to spit out dynamic page names, you will need to dynamically also update your Nav Links in accordance with the page name changes.

That's how I see it.

Saj

I need to come back to this. Even though it is so old, the problem still exists.

@saj Answer didn’t help because the filename is not involved anywhere.

What I don’t understand is if there is any JS or CSS stuff involved to highlight the navbar entry of the current page. How is this done?

  1. I want to use “Smart Active State” on every page. So I enable it for the NAVBAR, and copy the whole thing as a linked component to all other pages.

  2. Every NAVITEM is neither disabled nor active.

  3. The URL for every NAVITEM/LINK points to the HTML, including the language extensions like blog.html.de

But it’s not working. The nav bar doesn’t indicate the current page anyhow.

How to use a linked navbar component, that highlights the current page?

http://blog.html.de

Link does not work.

Can you share your .bsdesign file?

That was no link, and the forum software thought it was.

@robert_m_muench I believe the Smart Active State works as this.
If the URL of your site is for example https://bobsbaitshop.io/blog.html.de and there is a link in your Nav of the same name /blog.html.de then Smart Active State marks that Nav link as active.

That should be true regardless of what page the server serves up as long as the URL contains the /blog.html.de
However, I don’t know that .html.de is legit so that could be something that may muddle things up.
It might be better so pass a flag such as /blog.html?lang=de and use that to figure out the language settings.

Sorry, my job has changed so I don’t do web design so much and with hundreds upon hundreds of unread messages I’m going to be slow to respond to things.

Saj

Two years ago, I had to take about 8 months off from the BSS Forum to deal with family stuff and when I came back I had to work my way through about 800 messages. Took me about 6-8 weeks to get caught up.

I use it and it works normally, it would be great if you provided the website link so we can see.

I will send you images of how I use it.

image
image

The way I configured

image

If you select the active selection as shown in the image below, it will not give the expected result.