Project

General

Profile

Bug #101387

Updated by Jan Kornblum 10 months ago

Meta tags "keywords" and "description" can be set from within an uncached extbase controller action using the MetaTag API as follows: 

 <pre><code class="php"> 
 $metaTagRegistry = GeneralUtility::makeInstance(MetaTagManagerRegistry::class); 
 $metaTagRegistry->getManagerForProperty('keywords')->addProperty('keywords', $keywords); 
 $metaTagRegistry->getManagerForProperty('description')->addProperty('description', $description); 
 </code></pre> 

 But it is not possible to set meta tag "robots" using the same way: 

 <pre><code class="php"> 
 $metaTagRegistry = GeneralUtility::makeInstance(MetaTagManagerRegistry::class); 
 $metaTagRegistry->getManagerForProperty('robots')->addProperty('robots', $robots); 
 </code></pre> 

 It seems that "robots" can only be set from within a cached action. This should be fixed to be able to modify "robots" even if plugin is uncached.

Back