Hi Saguaros
I can't find a standard index.php file in the T4_bs5_blank template, just a small amount of code. There are lots of json files but I am lost!
I got some advice on the Joomla forum and have created a new file (/local/html/layouts/t4/index.php) by adapting code from the cassiopeia template and a previous version of the t4 index.php file.
It gives this info which others might find helpful ..
<body class="
site-default navigation-default theme-default layout-default nav-breakpoint-lg oc-desktop com_content view-article item-973 site id-32 catid-44 parentid-41">
I am sure this can be improved!
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{t4:language}" lang="{t4:language}" dir="{t4:direction}">
<head>
{t4:system_advancedCodeAfterHead}
{t4post:head}
<!--[if lt IE 9]>
<script src="<?php echo JUri::root(true); ?>/media/jui/js/html5.js"></script>
<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=yes"/>
<style type="text/css">
@-webkit-viewport { width: device-width; }
@-moz-viewport { width: device-width; }
@-ms-viewport { width: device-width; }
@-o-viewport { width: device-width; }
@viewport { width: device-width; }
</style>
<meta name="HandheldFriendly" content="true"/>
<meta name="apple-mobile-web-app-capable" content="YES"/>
<!-- //META FOR IOS & HANDHELD -->
<?php
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\Document\HtmlDocument $this */
$app = Factory::getApplication();
// $wa = $this->getWebAssetManager();
?>
<?php
// Detecting Active Variables
// $option = $app->input->getCmd('option', '');
// $view = $app->input->getCmd('view', '');
// $layout = $app->input->getCmd('layout', '');
// $task = $app->input->getCmd('task', '');
$itemid = $app->input->getCmd('Itemid', '');
$id = $app->input->getCmd('id', '');
// $catid = $app->input->getCmd('catid', '');
// $sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
// $menu = $app->getMenu()->getActive();
// $pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
?>
<!-- John's script for body tags -->
<?php
$input = Factory::getApplication()->input;
$view = $input->get('view', 0);
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName('catid'));
$query->from($db->quoteName('#__content'));
$query->where($db->quoteName('id') . ' = ' . $db->quote($id));
$db->setQuery($query);
$catid = $db->loadResult();
$query = $db->getQuery(true);
$query->select($db->quoteName('parent_id'));
$query->from($db->quoteName('#__categories'));
$query->where($db->quoteName('id') . ' = ' . $db->quote($catid));
$db->setQuery($query);
$parentid = $db->loadResult();
?>
<!-- end of John's script for body tags -->
{t4:system_advancedCodeBeforeHead}
</head>
<!--
<body class="{t4post:bodyclass}">
-->
<body class="
{t4post:bodyclass}
site <?php echo
// $option
// ($itemid ? ' itemid-' . $itemid : '')
($id ? ' id-' . $id : '')
. ($catid ? ' catid-' . $catid : '')
. ($parentid ? ' parentid-' . $parentid : '');
// . ($pageclass ? ' ' . $pageclass : '')
// . $hasClass
// . ($this->direction == 'rtl' ? ' rtl' : '');
?>">
{t4:offcanvas}
<div class="t4-wrapper">
<div class="t4-content">
<div class="t4-content-inner">
{t4:system_advancedCodeAfterBody}
{t4:body}
{t4:system_advancedCodeBeforeBody}
</div>
</div>
</div>
</body>
</html>