[themes] formatting text

josh on josh at theyrule.net
Fri Feb 3 07:05:02 UTC 2006


Hi,

I call up a blog entry from a snippet and it doesn't get formatted with <p> tags.  When I visit it the regular way it doesget formatted.  Both methods seem to go through the same node.tpl.php file - it seems that the $content var that is passed to that should already have the formatting.

this is the snippet code I am using:

-----------------------------------------------------8<---------------------------------------
function _myfunctions_latest_blog_entries($listlength, $userid) {
 $sql = "SELECT * FROM {node} n, users WHERE n.type = 'blog' AND n.uid = $userid AND n.status = 1 AND n.uid = users.uid ORDER BY n.created DESC LIMIT $listlength";
 $result = db_query($sql);
 while ($anode = db_fetch_object($result)) {
  $output .= theme('node', $anode, $teaser = FALSE, $page = FALSE);
 }
 return $output;
}
-----------------------------------------------------8<---------------------------------------

I guess the problem is in this line?:

$output .= theme('node', $anode, $teaser = FALSE, $page = FALSE);

What should I call instead?

Thanks for any help in understanding this.

Josh



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/themes/attachments/20060203/6cc3dd3f/attachment.htm


More information about the themes mailing list