Closed (duplicate)
Project:
Blog Information
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2009 at 23:10 UTC
Updated:
25 Apr 2009 at 23:17 UTC
What I did is to replace <?php print $title; ?>
with this on page-blog.tpl.php :
<?php
$block = module_invoke('bloginfo', 'block', 'view', 0);
if ($block['subject']) {
$output = "<div class=\"bloginfo-block\">\n";
$output .= "<div id=\"bloginfo-block-title\">".$block['subject']."</div>\n";
$output .= "<div class=\"content\">".$block['content']."</div>\n";
$output .= "</div>\n";
print $output;}
else print $title;
?>
On the user's blog page - this will give you the blog-info instead of the the normal title and the normal title if blog-info is empty.
and with this on page.tpl.php :
<?php if ($node->type == 'blog'): ?>
<div id="blog-title">
<?php
$block = module_invoke('bloginfo', 'block', 'view', 0);
if ($block['subject']) {
$output = "<div class=\"bloginfo-block\">\n";
$output .= "<div id=\"bloginfo-block-title\">".$block['subject']."</div>\n";
$output .= "<div class=\"content\">".$block['content']."</div>\n";
$output .= "</div>\n";
print $output;}
else print t("@username's blog", array('@username' => $node->name))
?>
</div>
<?php endif; ?>
Here you replace the title with the blog-info only if the node type is blog, you might want to give it an alternative (else) for nodes that are not blogs.
Comments
Comment #1
tsi commentedooops, tried to edit the original post.
marking as duplicate of http://drupal.org/node/445040
you can delete it if you want.