Skip to content

Commit 82feae2

Browse files
authored
[5.0] Template filenames (#41872)
In template manager when you open a file it displays the full path to the file at the top of the page. However for images and fonts this was incorrect and instead of something like `Editing file "‎/media/templates/site/cassiopeia/images/template_preview.png" in template "cassiopeia".` It displayed `Editing file "‎//images/template_preview.png" in template "cassiopeia".`
1 parent debb587 commit 82feae2

File tree

1 file changed

+1
-9
lines changed
  • administrator/components/com_templates/tmpl/template

1 file changed

+1
-9
lines changed

administrator/components/com_templates/tmpl/template/default.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,10 @@
5959
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editor', Text::_('COM_TEMPLATES_TAB_EDITOR')); ?>
6060
<div class="row mt-2">
6161
<div class="col-md-8" id="conditional-section">
62-
<?php if ($this->type == 'file') : ?>
62+
<?php if ($this->type != 'home') : ?>
6363
<p class="lead"><?php echo Text::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', '&#x200E;' . ($input->get('isMedia', 0) ? '/media/templates/' . ($this->template->client_id === 0 ? 'site' : 'administrator') . '/' . $this->template->element . str_replace('//', '/', base64_decode($this->file)) : '/' . ($this->template->client_id === 0 ? '' : 'administrator/') . 'templates/' . $this->template->element . str_replace('//', '/', base64_decode($this->file))), $this->template->element); ?></p>
6464
<p class="lead path hidden"><?php echo $this->source->filename; ?></p>
6565
<?php endif; ?>
66-
<?php if ($this->type == 'image') : ?>
67-
<p class="lead"><?php echo Text::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', '&#x200E;' . $this->image['path'], $this->template->element); ?></p>
68-
<p class="lead path hidden"><?php echo $this->image['path']; ?></p>
69-
<?php endif; ?>
70-
<?php if ($this->type == 'font') : ?>
71-
<p class="lead"><?php echo Text::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', '&#x200E;' . $this->font['rel_path'], $this->template->element); ?></p>
72-
<p class="lead path hidden"><?php echo $this->font['rel_path']; ?></p>
73-
<?php endif; ?>
7466
</div>
7567
<?php if ($this->type == 'file' && !empty($this->source->coreFile)) : ?>
7668
<div class="col-md-4 text-end">

0 commit comments

Comments
 (0)