Basicly i have all my pages with the respective class inside a folder called pages and in my MainView file i have my EdgeNavigator that will be calling the pages.
My goal is to use one EdgeNavigator to navigate between my pages, and the problem that i´m facing is that i can´t toggle my sidebar from my pages.
first, huge thanks for posting a complete ready-to-run test case. What a pleasure to work with this!
As for the problem you have. The main issue is that the EdgeNavigator and sidebar live outside of your page scopes. Previously it was suggested to use ux:InnerClass to gain access to parent scopes, but that is no longer a best practice. Instead, you can look into using ux:Dependency to inject references to those 2 elements to your pages (you can read more about dependencies here: https://www.fusetools.com/docs/ux-markup/dependencies).
NavigateToggle is a neat trigger, one that only works inside of an EdgeNavigator. It takes a Target property (which is the sidebar panel), and it accepts a TargetNode property, which should be the EdgeNavigator - and that’s because your EdgeNavigator itself lives in the parent scope, and your pages don’t know they’re inside of one.
With all that in mind, here’s your code with very minor adjustments: