Wordpress - add meta box to specific page template

Hi, I have run into a problem which Im not sure is possible with standard wordpress and no extra php. Basically I have a page template for “Hosting Plans” page. This displays a number of custom post types in a table (Plans).

What I would like to be able to do is to add a meta box with a list of “Plans” custom post types for the user to select. Its possible to add the meta box to all pages but I want it to only show if it is a page using the template “Hosting Plans”. Is this even possible?

Well this is 4 months later and may not help iStudios per se, for anyone else looking check these 2 great links:

and one step back:

If your custom page template filename is foobar.php, you can use get_post_meta():

global $post;
if ( 'foobar.php' == get_post_meta( $post->ID, '_wp_page_template', true ) ) {
    // The current page has the foobar template assigned
    // do something
}

Personally, I like calling this inside my add_meta_boxes_page callback, and wrapping it around the add_meta_box() call itself.

function wpse82477_add_meta_boxes_page() {
    global $post;
    if ( 'foobar.php' == get_post_meta( $post->ID, '_wp_page_template', true ) ) {
        add_meta_box( $args );
    }
}
add_action( 'add_meta_boxes_page', 'wpse82477_add_meta_boxes_page' );

You’ll just need to instruct users to save the page after assigning the template, so that the meta box appears.