Page representation not loading default (site) representation controller

Hi!

According to Content representations: Representation controllers, representation templates without an existing template representation controller (say home.exhibitor.php), should use the corresponding representation controller of site (say site.exhibitor.php).

So, why do these controllers…

# controllers/site.exhibitor.php
return function($kirby, $pages, $page) {
	return [
		'controller' => 'site.exhibitor.php'
	];
};
# controllers/site.php
return function($kirby, $pages, $page) {
	return [
		'controller' => 'site.php'
	];
};

…make this template…

# templates/home.exhibitor.php
<?= $controller ?>

…echo: site.php??? (when site.exhibitor.php is expected)

Just in case, I tried controllers/default.php and controllers/default.exhibitor.php but that return and error saying $controller doesn’t exist.

Thanks!

You’re reading this a little wrong (and it’s not phrased well, default is a bad example): If no representation controller home.exhibitor.php exists, it either uses the normal controller for this template home.php or the general site.php controller (with v5 “and” as the site controller will always be merged into the normal controller then). There is no site representation controller like site.exhibitor.php so far. I am looking into though whether that could be a nice enhancement in a future version.

Thanks, @distantnative!

I see. Well, too bad for me. :melting_face:

Consider my question a vote for this feature then. :grimacing: