What happens is that I have a template in the dashboard and I divided a header and a footer into two parts, and save them in separate files in one that says template, if I call those views in a new blank file only with include_once it brings it to me but only if that file is in the root if I call those views from another folder it brings them to me but the design is lost, what will it be?
I recommend you to use static URL for your styles and example script:
change it to:
Given that the problem you present is because of this. If you call from somewhere else, it will look for that directory, but since it is not there, it will not load the styles and scripts. On the other hand, if you put a static URL, it will call those resources directly.