Alexander,
Unfortunately, no.
...................................................
Sincerely,
Nicepage Support Team
Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp
I solved it by adding next script into Site Settings -> Additional Head HTML:
< script> (remove space)
document.addEventListener('DOMContentLoaded', function() {
// Get the current page href
const currentPage = window.location.pathname === '/' ? './' : window.location.pathname.split('/').pop();
// Get all navigation links
const navLinks = document.querySelectorAll('.u-nav-item a');
// Loop through the navigation links
navLinks.forEach(link => {
// Check if the href of the link matches the current page
if (link.getAttribute('href') === currentPage) {
// Add the active class to the matching link
link.classList.add('active');
}
});
});
</script>
by publishing I needed to change const currentPage with following code:
const currentPage = window.location.pathname === '/' ? './' : ('/' + window.location.pathname.split('/').pop());
and add following CSS:
.active {
font-weight: bold;
}
here you can change CSS how it is needed. If you want to set color, do: color: #... !important;
I solved it by adding next script into Site Settings -> Additional Head HTML: < script> (remove space) document.addEventListener('DOMContentLoaded', function() { // Get the current page href const currentPage = window.location.pathname === '/' ? './' : window.location.pathname.split('/').pop(); // Get all navigation links const navLinks = document.querySelectorAll('.u-nav-item a'); // Loop through the navigation links navLinks.forEach(link => { // Check if the href of the link matches the current page if (link.getAttribute('href') === currentPage) { // Add the active class to the matching link link.classList.add('active'); } }); }); </script> by publishing I needed to change const currentPage with following code: const currentPage = window.location.pathname === '/' ? './' : ('/' + window.location.pathname.split('/').pop()); and add following CSS: .active { font-weight: bold; } here you can change CSS how it is needed. If you want to set color, do: color: #... !important;Last edited 30 July 2024 by dagnarus
Hello Alexander,
Excellent Solution!
We're glad you could make it and share it with us.
If you have any more questions or need any further assistance, feel free to ask!
We will be happy to help you at any time.
...................................................
Sincerely,
George.
Nicepage Support Team
Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp