1

I'm starting a new Joomla 3. x template and I'm finishing the front page index.php, now the problem is when I go to an article the same page is appears (the front-page) how can I create a custom page for articles like articles.php .

index.php : (lot of code that's why I'm using the link) https://pastebin.com/qSRpc66U

1

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.