Pattern Lab

We’ve done this on one of our projects :slight_smile: The setup was quite in depth and time pressures mean I can’t fully outline right now, but I’m planning a blog post. It is possible though. Especially using the controllers in sage 9.

In a nutshell the workflow was to build components in the styleguide - which sat at the same level as the resources folder:
42
The.content.php contains the variables that in the theme are replaced via the controller.

we we’re then able to set view paths in app/config/view:

get_parent_theme_file_path().'/styleguide',

whcih allowed us to include styleguide templates in the theme with:

@include('partials.carousel.carousel--full_row', $data = $data_variable_from_controller)

(apologies - the setup to arrive at this workflow was a little more complex), but the upshot is that we had a blade template styleguide populating the theme with components directly.

4 Likes