Section using information from another section
Created 5 years ago by emperorkoala

So I've just started work on this module, and the routing is correct, they all point to their respective controllers. For some reason though, one of the sections seems to be using information (i.e. the section title and the highlighted section name) of a different section. I'm fairly new to Pyro and Laravel and all of it, so I am still learning, but this just doesn't seem to be making any sense.

Here is my routing code:

The problem is that when I go to the characters section, it loads the title and button from the spells section, but the filters from the characters controller, and it highlights spells in the navbar on the side as though that's the section I'm in. Even stranger, when I specifically add "/spells" to the end of the URL, it loads the spells section exactly correctly, and when I added an entry there, it didn't appear in the weird section.

If you need images to more clearly visualize the problem I can provide those. Any help would be great.

ryanthompson  —  5 years ago

Can you show us your module's section property please? That will be the part that handles the section information (and therefore CP buttons) that you are referring to!

emperorkoala  —  5 years ago

I actually figured it out. It was just the sections array in the module class. Because I the order I made the streams was different from what I wanted the page to load, it was loading parts of the wrong section. By moving the correct section to the front of the array, it corrected itself.