Closed Fanni-Portier closed 2 years ago
Hello,
there should not be any problems with Contao 4.12 and PHP8. However, I have only tested it with an earlier version than 4.12.4.
Could you post your template once? The integration should look like this:
$this->styleManager->get('testtest');
This is the part of the fe_page.html5 with the integration.
`<?php $this->block('main'); ?>
<?php $this->endblock(); ?>`
It should be working this way? So I have to go error hunting in the backend?
I could imagine that the hook used, where the StyleManager object is added in the templates, does not work for page templates.
Could you please test this once and try to fill the ce_text
template or a similar template with your code? If this works, it would confirm my suspicion.
As soon as I have some more time, I will check the problem and see if I can make this feature available for page templates as well.
But yes, this should work:
<h1 class="<?=$this->styleManager->get('testtest')?> ">styleManager: <?=$this->styleManager->get('testtest')?></h1>
I was able to reproduce the issue. In fact, the template variables within pages and layouts are not supported yet.
I will look at the issue again and try to provide an appropriate fix.
Fixed in the develop
branch. @Fanni-Portier could you please install this branch and test it?
After that, I would create a new release. Thanks!
Sorry - I had a few days off :). Thank you very much for your help! I am using the Contao Manager - is there a way to use the develop branch?
Good evening @Fanni-Portier ,
you should be able to install the develop branch by using dev-develop
as a version:
dev-develop
@zoglo thank you very much - I had no idea! @doishub It workes perfectly fine :)
Hello!
I tried to use your really promisful extension - but unfortunately I failed.
In the Backend everything seems to work as expected, but I could not manage to get the Class into my fe_page.html5 Template. The compatibility is declared for up to 4.9 but is it possible that it does not work with Contao 4.12.4 or with php 8?
I added this to the template and "testtest" is the category identifier: <?=$this->styleManager->get('testtest')?>
thanks, Fanni