Navigation is not working on subpage | bootstrap

Hi,

I’m new to kirby, so please don’t judge me, if you see some errors. But feel free to tell me about it.
My problem: My website possesses a navigation bar, that uses bootstrap. On my main page I have no problem with it. On ‘www.themovemax.com/salsa’ either. But on the salsa subpage ‘www.themovemax.com/salsa/salsaunterseite’ I cannot access my navigation bar. I searched them web for some fixes, but could not find some. So I would be very happy if you could give me a hint. At the same time I would appreciate it, if you find some other problems or potential improvements I could work on :slight_smile:

Thank you,
Max

Can you please post the PHP code you are using for the menu? I suspect you probably populating the menu using children() and the salsauntersite page does not have any.

There a quite a few JS errors in your console. Doesn’t seem to be a problem with your PHP code but with your JS.

Don’t know why you are not using href attributes here but leaving it all to JS.

I suggest to get it all running with normal links first and then enhance with JS, that way your site would also work if JS is disabled.

And that too :slight_smile:

Your javscript links need to be absolute:

<script src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/all-js.js"></script>
<script src="/assets/js/wow.min.js"></script> 
1 Like

I think the @thewebmax may have just made some changes, i got 500 errors on all the scripts on this page http://www.themovemax.com/salsa/salsaunterseite a few minutes ago.

Yes, right, sorry,I just removed my comment.

Kirby has useful helpers for including your CSS and JS:

<?= js('assets/js/your_resource.js');
<?= css('assets/css/your_resource.css');
1 Like

Thank you for your time @texnixe and @jimbobrjames . I have solved the problem by making those javascript files absolute. Have a great weekend :slight_smile:

1 Like