Hello,
I'm testing with the API to accurately define the Meta description and Meta title tags for my article.
Below is an excerpt of the code:
the lineworks well. I retrieve the correct Meta description in my article but I cannot do it for the Meta title.
I tried to do it like thisit doesn't work.
I haven't seen any information about this in the documentation.
Do you have an idea?
Thanks
I'm testing with the API to accurately define the Meta description and Meta title tags for my article.
Below is an excerpt of the code:
Code:
$this->article = ['title' => $article->titre.$now,'articletext' => $content2,'state' => 1,'catid' => $this->categorie,'tags' => $tags,'alias' => $article->slug.$now,'metakey' => $article->metaKey,'metadesc' => $article->metaDescription,'language' => "*",'metadata' => [ 'title' => 'Test Meta Title personnalisé', 'author' => $name, 'robots' => 'index, follow', 'rights' => 'All rights reserved',],'images' => ['image_intro' => $urlImage,'image_intro_alt' => $article->titre,'image_fulltext' => $urlImage,'image_fulltext_alt' => $article->titre,],
Code:
'metadesc' => $article->metaDescription,
I tried to do it like this
Code:
'metatitle' => $article->metaTitle,
I haven't seen any information about this in the documentation.
Do you have an idea?
Thanks
Statistics: Posted by ec83 — Mon Aug 19, 2024 4:06 pm