php - How can i add view in the content template module in drupal? -


hi m working on content template module in drupal,but there problem in showing view of ranking field below coding

<td width="10%" align="left"><font color="#669900"><b>address:</b></font></td> <td colspan="3"><?php print $node->field_perm_add_line1[0]['view'] ?>,<?php print $node->field_perm_add_line2[0]['view'] ?></td> <td align="left"><font color="#669900"><b>website:</b></font></td> <td align="left"><?php print $node->field_website[0]['view'] ?></td> <td width="8%" align="left"><font color="#669900"><b>phone:</b></font></td> <td width="42%" align="left"><?php print $node->field_phone1[0]['view'] ?><?php echo ","; print $node->field_phone2[0]['view'] ?></td> <td align="left"><font color="#669900"><b>email:</b></font></td> <td align="left"><?php print $node->field_alt_email[0]['view'] ?></td> <td align="left"><font color="#669900"><b>fax:</b></font></td> <td align="left"><?php print $node->field_fax[0]['view'] ?></td> <td align="left"><font color="#669900"><b>rankings:</b></font></td> <td colspan="3"><?php print $node->field_university_rankings[0]['view'] ?></td> <td align="left" colspan="4"><font color="#669900"><b>description:</b></font></td> <td style="background-color:#fff; align="left" colspan="4"><?php print $node->field_description[0]['view'] ?></td> 

but ranking field have designed view has argument title can't how add please help.......... in advance pranoti

you start

 var_dump($node->field_university_rankings[0]); 

to find out how structured. doubt code,

 $node->field_university_rankings[0]['"check_plain($node->title)"'] 

is correct. since drupal hardly use stripped version of title key in array. once var_dump() tells exact key of array, use that.

i assume find see like

$node->field_university_rankings[0]['value']; //=> full, or lartial $node-object. $node->field_university_rankings[0]['view']; //=> string title of node, in  link. 

the exact output of 'view' created display settings go field. should try configure in such way, 'view' outputs correct string.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -