Does anyone know how to print out custom profile fields for use inside a blog teaser on the main page. I just want this to appear right after the print $submitted
statement. Being new to PHP, im not sure if i should use print $user->profile_company
.
Also, if I could add a new variable to the $submitted array within the PHPtemplate.engine file, that would be great as well.
This is the area of PHPTemplate.engine where I think the new variables should go:
$variables = array(
'content' => ($teaser && $node->teaser) ? $node->teaser : $node->body,
'date' => format_date($node->created),
'links' => $node->links ? theme('links', $node->links) : '',
'name' => theme('username', $node),
'node' => $node, // we pass the actual node to allow more customization
'node_url' => url('node/'. $node->nid),
'page' => $page,
'taxonomy' => $taxonomy,
'teaser' => $teaser,
'terms' => theme('links', $taxonomy),
'title' => check_plain($node->title)
);
// Flatten the node object's member fields.
$variables = array_merge((array)$node, $variables);
// Display info only on certain node types.
if (theme_get_setting('toggle_node_info_' . $node->type)) {
$variables['submitted'] = t('Submitted by %a on %b.', array('%a' => theme('username', $node), '%b' => format_date($node->created)));