Replace hardcoded HTML content with Joomla code. For example, add this to the main content area to render the component and system messages:
<jdoc:include type="message" />
<jdoc:include type="component" />
Use this to render the head:
<head>
<jdoc:include type="head" />
</head>
Do not include any other tags within the head. Add tags programmatically instead, e.g. see the code you have on how to include stylesheets:
JHtml::_('stylesheet', 'template.css', array('version' => 'auto', 'relative' => true));
Do the same for your other stylesheets.
Use $this->setHtml5(true);
to set HTML5 mode.
Set metadata with $this->setMetadata()
, e.g.:
$this->setMetaData('viewport', 'width=device-width, initial-scale=1.0');
Note, only set global metadata that you want to appear on all pages. Do not add content-specific meta tags such as title or meta description. These are generated dynamically by components.