Description
Related to this discussion: https://discourse.roots.io/t/sage-10-as-parent-child-themes/
It would be fantastic to get some feedback ftom @Log1x and @QWp6t
Steps to reproduce
1. Parent Theme:
1.1 Make a new Sage 10 Theme with custom Namespace "Parent" in folder 'parent'
1.2 Add some View Composers variables such as "siteName" and reference it in a blade file
1.3 Add a function my_test_function() to helpers.php
1.4 Activate the theme, it should be working and the variable $siteName is outputted correctly
2. Child Theme
1.1 Make a new Sage 10 Theme and leave the Namespace as "App" in folder child
1.2 Add Template: parent to style.css
1.3 Remove all blade files from ./resources/views/
1.4 Use \Parent\my_test_function() e.g. in a child View Composer
1.5 Autoload parent theme Class in composer.php:
"psr-4": {
"App\\": "app/",
"Parent\\": "./../parent/app/"
}
1.5 Activate the child theme
Expected behavior: [What you expect to happen]
Actual behavior: [What actually happens]
Reproduces how often: [What percentage of the time does it reproduce?]
In the current setup 100%. More tests required.
Versions
Sage 10.0.0-alpha
Additional information
It would be fantastic to get a very short summary how child/parent themes should be set-up with Sage 10.
Description
Related to this discussion: https://discourse.roots.io/t/sage-10-as-parent-child-themes/
It would be fantastic to get some feedback ftom @Log1x and @QWp6t
Steps to reproduce
1. Parent Theme:
1.1 Make a new Sage 10 Theme with custom Namespace "Parent" in folder 'parent'
1.2 Add some View Composers variables such as "siteName" and reference it in a blade file
1.3 Add a function
my_test_function()tohelpers.php1.4 Activate the theme, it should be working and the variable
$siteNameis outputted correctly2. Child Theme
1.1 Make a new Sage 10 Theme and leave the Namespace as "App" in folder
child1.2 Add
Template: parenttostyle.css1.3 Remove all blade files from
./resources/views/1.4 Use
\Parent\my_test_function()e.g. in a child View Composer1.5 Autoload parent theme Class in composer.php:
1.5 Activate the child theme
Expected behavior: [What you expect to happen]
\Parent\my_test_function()\Roots\config()is loading parent theme value, if child theme value is not setActual behavior: [What actually happens]
Undefined variable: siteNameerrors, the View Composers from the parent theme are missing\Parent\my_test_function()\Roots\config('app.debug')is not set in child theme as function not checks against parent valueReproduces how often: [What percentage of the time does it reproduce?]
In the current setup 100%. More tests required.
Versions
Sage 10.0.0-alpha
Additional information
It would be fantastic to get a very short summary how child/parent themes should be set-up with Sage 10.