php syntax display custom fields in article

  • mjl1817
  • Auteur du sujet
  • Visiteur
  • Visiteur
il y a 9 ans 1 mois #3440 par mjl1817
php syntax display custom fields in article a été créé par mjl1817
Hi,
I am attempting to modify one of the templates but I am running into a difficulty regarding the custom fields. I cannot figure out the correct syntax structure to pull the correct field or information. I have tried the following

if ($row->custom field name!=null) {echo '<span><span itemprop="customfieldname">'.$row->customfield.'</span></span><br />';};

also I have tried echo "$customfieldalis";

and $txt = "";
$x = $customfieldname;
$y = $customfieldname;

echo $txt;
echo "<br>";
echo $x;
echo "<br>";
echo $y;

none of which works. Could you please give me an idea of what I am failing to do?
Le sujet a été verrouillé.
Plus d'informations
il y a 9 ans 1 mois #3445 par gmapfp
Hi,

The name of the custom fields are :

field_xx

with xx are the id of the field.
Le sujet a été verrouillé.
  • mjl1817
  • Auteur du sujet
  • Visiteur
  • Visiteur
il y a 9 ans 1 mois #3447 par mjl1817
Réponse de mjl1817 sur le sujet php syntax display custom fields in article
Solved! works perfectly,
Thank you!
Le sujet a été verrouillé.
Temps de génération de la page : 0.076 secondes
Propulsé par Kunena
FaLang translation system by Faboba