kirby-blade icon indicating copy to clipboard operation
kirby-blade copied to clipboard

Template views using dot notation don't work

Open S1SYPHOS opened this issue 2 years ago • 0 comments

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

S1SYPHOS avatar Jun 25 '22 17:06 S1SYPHOS