Shared templates extension not working?

I’m following the Quick Tip guide on how to share templates, but I’m not having any luck with it.
Link: Sharing templates across blueprints | Kirby CMS

  1. I’ve set up the plugin folder as such:
site/plugins/sharedtemplates/
  1. in it I have a index.php file with the following code:
<?php

use Kirby\Cms\App as Kirby;

Kirby::plugin('studio/sharedtemplates', [
    'templates' => [
        'work' => __DIR__ . '/templates/about.php',
    ]
]);
  1. I’ve double checked that I have the about.php template in my site template directory
site/templates/about.php
  1. When I go to example.com/work I would expect it to use the about.php template but it just uses the work.php template, and when I remove the work.php template it used the default template.

I’m doing this on local development if that has any effect on it, but I’m rather lost for what I’m doing wrong so any suggestions would be appreciated!!!

thank you in advance :slight_smile:

Side question:
Is it not possible to include the:

'templates' => [
        'work' => __DIR__ . '/templates/about.php',
    ]

directly in the config file? - just asking as having the plugin folder just to assign templates seems a bit much :slight_smile:

The templates dir is supposed to be with the plugin folder, not the main site/templates folder. __DIR__ refers to the current folder.

apologies I forgot to mention I tried with both the default template directory but also with:

site/plugins/sharedtemplates/templates/about.php

which was not working either

now it’s working - so I’m assuming I had mistyped something somewhere :slight_smile: #MidWeekMind