Translate simple code snippet - Get taxonomy term id
I never used "page--taxonomy.tpl.php", but based upon what you want to do, I guess your looking for taxonomy-term.tpl.php.

In Drupal 7, you have a $term variable, from which you can get the tid. Below is some D7 code I've used for a similar purpose, that I adapted a bit to yours. Note that the argument to Views must be in an array.

$view = views_get_view('taxonomypages');
$view-&gt;execute_display('panel_pane_1', array($term-&gt;tid));
$output = $view-&gt;render();


But I do not recommend you proceed down this path. Instead use Panels, and pass the argument to a View that way. Yes, it will require a bit more configuration, but it will also be much more sustainable, easier to maintain, and keep less logic in the template files.

Relevant panels tutorials here.