Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Rudolf Baláš
  2. Form2Content Lite & Pro
  3. Sunday, 14 April 2019
  4.  Subscribe via email
Hi,

In template I use {$JOOMLA_TITLE_RAW} - this output is wrong:


<meta itemprop="name" content="" cbd="" olej="" působí="" jako="" malý="" zázrak""="">


The original title of article is:


"CBD olej působí jako malý zázrak"


How can I strip quotes in name?


Thanks

Rudolf
References
  1. https://www.zelenazeme.cz/reference/konopna-kosmetika-reference
Responses (3)
Accepted Answer Pending Moderation
The right output have to:


<meta itemprop="name" content="cbd olej působí jako malý zázrak">


I try:


{php}
$JOOMLA_TITLE_RAW = {$JOOMLA_TITLE_RAW};
$JOOMLA_TITLE_RAW = str_replace('"', '', {$JOOMLA_TITLE_RAW});
{/php}


unfortunately it did not help.
Accepted Answer Pending Moderation
Hi Rudolf,

Are you trying to add the meta tag in the page head? So is this code in your Joomla template index.php?

I don't understand the use of the PHP tags. Doesn't this work?

<meta itemprop="name" content="{$JOOMLA_TITLE_RAW}">

If you want to modify the output you can use smarty:
https://www.smarty.net/docs/en/language.modifier.strip.tags.tpl
https://www.smarty.net/docs/en/language.modifier.replace.tpl

Hope this helps.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
Accepted Answer Pending Moderation
Great Patrick :)

I need strip quotes in article title, because in F2C template I added some rich snippets meta tags for google review.


<meta itemprop="name" content="{$JOOMLA_TITLE_RAW|replace:'"':''}">


Now is ok :)

Thanks
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.