Community

how to create template file for not existing node/page?

for example i want my template executes when that URL was entered "http://site.com/nodetype_node_title/ key_word ".
i create theme suggestion in template.phpL:
function THEME_process_page(&$variables) {
$path_arr = explode('/', $_SERVER['REQUEST_URI']);
if($path_arr[2] == 'key_word '){
$variables['theme_hook_suggestions'][] = 'page__keyword';
}
}
so, i see my template works, but title tag has text "not found"; and .
so my question is : is there any other way to create page with any 1st argument ? module autopath creates fine pathes for "created" nodes, but i don't want to create/clone one node for every user. this page must show almost the same thing for every user but with extra info which i take from "nodetype_node_title" - url argument.
i can change title and other tags in html.php for this case, but its not good.

Comments

If "nodetype_node_title" is a

If "nodetype_node_title" is a path alias you could use Sub-pathauto. I suspect there are better ways to achieve what you want than a template file per keyword.

this is strange for me that

this is strange for me that no one has problem like that, no one want to have page tpl for users/username/mytpl.page , that works same for all users but allows to have different urls for every user.

Use views and let 'keyword'

Use views and let 'keyword' be an argument - views can generate pages based of URLs like this.