Roots Discourse

Autoload and custom menu walkers

sage9
#1

Hi guys I’m trying to figure out two things in Sage 9:

  1. If I add new classes in /app folder, say /app/Walkers/MyMenuWalker.php, and the class path is App/Walkers/MyMenuWalker, how do I get those classes autoloaded? Since the app/ path is defined as psr-4 in sage’s composer, why won’t the App/Walkers/MyMenuWalker be autoloaded by composer?

  2. I realise there is Bootstrap 4 Navwalkers package, but if I want to create my own menu walkers, what’s Sage’s recommended place to put them?

Thanks.

0 Likes

#2

That should work. What’s the error you’re seeing?

0 Likes

#3

Weird… it works now. Sorry but thanks for taking the time to respond @alwaysblank

0 Likes