Create custom template.
Add template thumbs to media/templates/site/{template name}/images.
Template thumb should be visible in template manager (backend)
"preview" text is displayed instead of the thumb.
Joomla 4.3.2
In administrator/com_templates/src/Service/HTML/Templates.php in line 55 it first checks if template is inheritable. I think this part of code should be change. It should only check if thumb file exists in media folder.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-06-01 10:36:16 |
Closed_By | ⇒ | alikon |
closing as expected behaviour
Exactly. I'm creating a modern template based on Cassiopeia. My template wont be inheritable.
In my templateDetail.xml file inheritable is 0 (0). Thumbs is not show.
Thumbs is displayed only if I set inheritable = 1.
This is because in file administrator/com_templates/src/Service/HTML/Templates.php in line 55 it first check if this is inheritable template and inheritable is TRUE. If not then it go to next condition which is "old" template (legacy).
In first condition it should check if thumb exists in "new" location because inheritable is not required and can be omitted in "new" templates.
My template wont be inheritable.
That's not how it works. By definition modern templates ARE inheritable
Ah, ok. Thanks
The path
media/templates/site/{template name}/images
is only used by modern templates (ie supporting child templates). Legacy templates for B/C reasons still expect their thumbs in thetemplates/{template name}/