I would like to know what is the best way to add a JavaScript file into a specific page basing on the content type. For example, I want to add this:
<script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=false'></script>
So far, what I have done is using this way to add into my specific content type. For the map_page content type, I adde the below two line of code in page--map_page.tpl.php.
drupal_add_js("http://maps.google.com/maps/api/js?sensor=false", 'external');
$scripts = drupal_get_js();
Is there any other better way? if possible can give some example, currently not really understand well...