How can I get path aliases arguments from a URL in a template?
You can use function drupal_get_path_alias() to get the path alias, then strstr() to get the first component of the path, like so.

echo strstr(drupal_get_path_alias(), '/', TRUE);