A way to detect which page a post is on

Alright, nevermind. I got this solved by doing this at the top of the single post template:

$position_query = array( 'post_type' => 'portfolio', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => -1 );
$position_posts = get_posts($position_query); $count = 0;
foreach ($position_posts as $position_post) { $count++;
    if ($position_post->ID == $current_id) { $position = $count; break; }
}
$posts_per_page = get_option('posts_per_page');
$result = $position/$posts_per_page;
$current_page = ceil($result);