Forum
Possible Bug... Runway Create Content Template Amnesia
I see this across all of the perch sites I create.
If I set a content_create on a master page:
<?php
perch_content_create('Elsey Bookstore Links', [
"template" => "bookstores",
"multiple" => "true",
"edit-mode" => "listdetail",
"title-delimiter" => " ",
]);
?>
Then create a site page from that master page. The region 'Elsey Bookstore Links' is created and the proper template is selected for the region.
However, if you go to the 'Region Options' tab and scroll down to the 'Template' setting, the dropdown does not have the correct template selected but the top one in the list. This is pretty dangerous.
If you select the correct template on this tab, it will work going forward. But before you select it here, it's in danger of being over-written by the first template if the user clicks Save while the Template dropdown shows the first template in the list.
It reliably happens every time in Runway, not sure about plain Perch.
-- Monty
I think you need:
oh, ok.
But still a bug, no?
Why do you suggest that?
Because I generally understand that referring to templates in perch does not require you to reference the html extension.
And because in this case above, it works, except for the fact that that the 'region options' tab is not able to call up the attached template and can cause data loss.
Just seems like a rough edge.
Specifying the template file for a region to use isn't the same as displaying content. You need to be specific in this case.
But do you understand my point that it sort of works but in a dangerous way?
Ideally we wouldn't create the region if you pass in the path of a template that doesn't exist. However, that places a constriction on the order in which you develop, and would prevent you defining the region with the intention of adding the template later.