Closed faustbrian closed 12 months ago
That sounds like a thoughtful addition. However, there are other views that the view composer should be applied to. From the top of my head that's the Advanced SEO head view and the layout/template views of the social images generator. So these paths have to be considered as well. Those paths should probably not be configurable and simply be merged with the configurable path. The view composer also accepts an array.
Hey, I just encountered an issue with this package that could be easily resolved, but I wanted to ask before submitting a pull request. The issue arises here: ServiceProvider.php Line 195. The package assumes that we want to apply the view composer to all views in the entire project. This works well if you're running Statamic as a standalone project. However, when using Statamic as part of an existing project that stores views in another directory—let's say
resources/views/statamic
—the view composer still applies to everything outside of that directory. In my case, I would need a pattern likestatamic.*
instead of*
. I could submit a PR to make this configurable.