Unfortunately looks like there isn't a term machine name contextual filter option. There is one, but only for vocabulary machine name.
If you really want this, you will have to get your hands dirty.
Create a custom module with a custom page that has a variable url. ex: /taxonomy/%
the %
being a place holder for the machine name.
Then on page load using using current_path() along with some php function (perhaps str_ireplace() to remove the taxonomy/
part), you grab machine name from the url. Then you query the database, using db_query(), to grab the term id that belongs to that machine name.
Once you have the term id you can render the view on your screenshot using php. So you just pass the term id as the argument.
<?php
print views_embed_view('my_view', 'block_1', $arg,);
?>
so in your case it would be:
<?php
print views_embed_view('taxonomy_term', 'page', $term_id,);
?>
Update:
After looking at the taxonomy term table (taxonomy_term_data) turns
out that there is no machine name column for taxonomy terms (which explains
why there is no contextual filter in views).
Therefore, the only alternative would be to use the taxonomy term name. As long as you have unique term names, this will be fine.
First, you need to go to the taxonomy term view (the one in your screenshot) and press on
and add a block and save.
Here is a working module I created called term finder.
/sites/all/modules/term_finder
term_finder.info
name = Term Finder
description = Creates variable pages for taxonomy term names and shows a view.
core = 7.x
term_finder.module
<?php
/**
* Implements hook_menu().
*/
function term_finder_menu() {
$items = array();
$items['taxterm/%'] = array( // this will be our custom page url. The % allows us to put anything after, ex: taxterm/[anything can go in here]
'title' => 'Your Title Goes Here',
'access callback' => TRUE,
'page callback' => 'term_finder_page', // the name of the function that gets runed when we visit our taxterm/[anything] page.
'type' => MENU_NORMAL_ITEM,
'menu' => 'navigation',
);
return $items;
}
/**
* Page callback for taxterm/%.
*/
function term_finder_page() {
$path = current_path(); // gets the current page url. ex: taxterm/hello-world and saves it on a variable
$path = str_ireplace('taxterm/','', $path); // removes the taxterm/ from our variable, so we are left with hello-world
$path = str_ireplace('-',' ', $path); // replaces the - with a space, so we have hello world
$term_id = db_query("SELECT tid from {taxonomy_term_data} WHERE name = :name LIMIT 1", array(":name" => $path))->fetchField(); // queries the DB to find the tid that belongs to hello world.
if ($term_id != '') { // we check if grabbed a term id, is not empty.
$show_view = views_embed_view('taxonomy_term', 'block_1', $term_id); // creates the view, which passes the tid we got from the DB as an argument.
return $show_view;
}
else { // if the term id is empty, then we show "not found".
return 'not found';
}
}
Lets assume you have a term called Hello World.
What this does is if you go to /taxterm/hello-world
or (in firefox) /taxterm/hello world
It will look up in the DB for Hello World and get the term id and pass it to the view.
PS: In case you are wondering why the mysql query looks the way it does, see Writing secure code and How do I get only one result using db_query()