Edge templating, @section inside @component


I’ve seen that when I tried to use a @component and a @section inside the component I get an error!

I would like to decouple things and probably re-use the sections defined in the layouts.master inside a component.

For instance, I have a @!section('extra_js') which is right at the bottom of the @layouts('master') and within the component, I would like to add JS dependencies that are only related to the component itself and to be loaded only when that component is in use.


Another thing that i’ve noticed is that when you try to re-use a @section within a @section itself it doesn’t include the code where is supposed to be.


- master.edge

- home.edge
         <p>some other text</p>

the code from the nested section is included within the @section('content') rather than @section('bottom')


Yes first error is that sections cannot nested. It will be nice if you can share one error at a time with the actual code