I understand that node-blog.tpl.php themes the blog node in teaser or full page node. I am looking for a way to theme the layout of the full page blog entry.

page-blog.tpl.php seems to be the "section" page for the blog.
page.tpl.php seems to be the catch all. How to detect I am on a full page blog entry?

Comments

WorldFallz’s picture

page-blog.tpl.php would be the right template for a full page template for the blog content type. However, it's not one of the default core template files and suggestions. You'll need to add it manually to use it.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

kkobashi’s picture

Thanks WorldFallz

The thing that was throwing me for a loop was that page-blog.tpl.php was being used by default when I went to mysite.com/blog... something weird going on there.

Anyway, I put in a suggestion in template.php to do the following and page-blog.tpl.php now is used for blog entries:

  if (module_exists('blog')) {
    if ($variables['node']->type == "blog") {
      $variables['template_files'][] = 'page-blog';
    }
  }

You would think that since the blog module is a part of the installed core and that it is a popular module, that it would be supported...
Anyway, it works great. Thanks.

Kerry Kobashi

WorldFallz’s picture

excellent. I was surprised page content type templates weren't built in also, but at least it's easily done.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

jslag’s picture

Thanks for this snippet -- very helpful.