<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query. 
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage ThinkPlace
 * @since ThinkPlace 1.0
 */

global $post;
$metadata		= get_post_custom($post->ID);
$extraBodyClass	= get_the_title($post->post_parent);
$ancestorPostId	= $post->ID;
if (! empty($post->ancestors)){
	$ancestorPostId	= $post->ancestors[ count($post->ancestors) -1];
}
get_header(); ?>

			<div id="content" role="main">
				
					<?php
					/* Run the loop to output the posts.
					 * If you want to overload this in a child theme then include a file
					 * called loop-index.php and that will be used instead.
					 */
					 get_template_part( 'loop', 'index' );
					?>
					<?php edit_post_link( __( 'Edit', 'thinkplace' ), '<span class="edit-link">', '</span>' ); ?>
					
			</div><!-- #content -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

