Pregunta

my content type, plan to have one or more 'articles'.

the following php code, I can get them all:

<?php print render($content['field_articolo_di_riferimento']);?>

and I get the following result:

enter image description here

I would like to remove the title in bold above the links of the articles, so I tried:

<?php 
  $lenght = count($field_articolo_di_riferimento);

  for($i=0; $i<lenght; $i++){
  print render($content['field_articolo_di_riferimento'][$i]);
}
?>

but does not work. It is probably the wrong way I use to count the length of the array.

this is the structure of my content type:

enter image description here

¿Fue útil?

Solución

Instead, why don't you go to Manage display of your content type. ?q=admin/structure/types/manage/CONTENT_TYPE/display

And next to your field Articolo di Riferimento for the Label value choose <Hidden>. That should hide the label from the node display.

This is much similar. Besides the code you use will never affect the label.

Hope this helps... Muhammad.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top