Unable to use addCustomTag()
.
Add the following within the head tag of the frontend template.
<?php
$document = JFactory::getDocument();
$document->addCustomTag('<style>body {transform: rotate(180deg)}</style>');
?>
Page displays upside down
No change
Labels |
Added:
?
|
Title |
|
Are you still getting the same issue?
No error message but the custom tag is still not added.
I can't reproduce the issue and I suspect you're not using Cassiopeia. Maybe Lightning?
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-08-24 12:55:34 |
Closed_By | ⇒ | ciar4n |
Issue was on Cassiopeia. I'll close this. It can be re-opened if replicated.
$document
is undefined. Inside template files you should use$this->addCustomTag()
because$this
is the current document.