afbora / kirby-blade

Enable Laravel Blade Template Engine for Kirby 3
MIT License
20 stars 7 forks source link

Template views using dot notation don't work #26

Open S1SYPHOS opened 2 years ago

S1SYPHOS commented 2 years ago

Hey there, I'm used to name templates & stuff in dot notation, eg there's blog.article, blog.audio & blog.video for different formats of blog entries. Their templates would would be named blog.article.php etc, their content files blog.article.en.txt etc BUT when using your plugin, naming the template (= view) something like blog.article.blade.php doesn't work, because ..

.. line 86 in src/Template.php throws an InvalidArgumentException:

# src/Template.php
# line 86 be like:
$html = $this->blade->make($this->name, $data)->render();  # boom!

Here's an example from a page where the template name contact.press cannot be found:

Screenshot from 2022-06-25 19-08-51