I'd like to see a few page templates added to Thematic core and wanted to get feedback. To start, I'd like to add a full width template. There've been a lot of questions about it here- and the new 2010 theme includes one.
I think the only issues would be with child themes that don't have the styles set for it- but this won't be a problem unless someone upgrades their version of thematic and then tries to set the new page template. Hopefully child theme authors can just add the additional styles (or, they've called default.css and they'll be there).
To add it to Thematic, there would need to be a new file called template-fullwidth.php. I'd use "template" as a naming convention, so we can also add a "template-blog.php" template and/or "template-magazine.php" if we want to take it that far. The code for template-fullwidth.php would be:
<?php
/*
Template Name: Full Width
*/
// calling the header.php
get_header();
// action hook for placing content above #container
thematic_abovecontainer();
?>
<div id="container">
<?php thematic_abovecontent(); ?>
<div id="content">
<?php
// calling the widget area 'page-top'
get_sidebar('page-top');
the_post();
thematic_abovepost();
?>
<div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class() ?>">
<?php
// creating the post header
thematic_postheader();
?>
<div class="entry-content">
<?php
the_content();
wp_link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'thematic'), "</div>\n", 'number');
edit_post_link(__('Edit', 'thematic'),'<span class="edit-link">','</span>') ?>
</div>
</div><!-- .post -->
<?php
thematic_belowpost();
// calling the comments template
thematic_comments_template();
// calling the widget area 'page-bottom'
get_sidebar('page-bottom');
?>
</div><!-- #content -->
<?php thematic_belowcontent(); ?>
</div><!-- #container -->
<?php
// action hook for placing content below #container
thematic_belowcontainer();
// calling footer.php
get_footer();
?>
Styling would be added to the bottom of default.css:
/* =Page Templates
-------------------------------------------------------------- */
.page-template-template-fullwidth-php #container {
margin:0;
width:940px;
}
.page-template-template-fullwidth-php #content {
margin: 0 0 0 10px;
width:940px;
}
.page-template-template-fullwidth-php #comments {
width:540px;
}
The styling for this could also go in layout css. It seems a bit redundant, but it might be more intuitive for people to look there. What do you think?
I've tested it on a local version. If anyone sees any errors or has any comments, I'd appreciate the feedback. Perhaps Gene or Chris can decide if it's commit worthy. Thanks for reading.