By kingqueenyun on
Different templates depending on URL aliases in drupal7?
visiting url:mysite.com/login,loading template not page.tpl.php,but is login.tpl.php.
How to implement above function?
some code $variables['template_files'][]...in drupal 6 can solve this problem,Why this method won't work in drupal 7?
sorry for my english.
Comments
Solved
Here i found solution. Work for me. (Drupal 7)
forrst.com/posts/Add_page_template_suggestions_depending_on_conte-sDR
www.ArtReaktor.com
English node
If I've got a node in an alternative language: mysite.com/en/[alias], how must I name it? page--en--[alias] doesn't work.
Modification for nodes
I wanted to do something similar, but for a particular node. I had to make three changes to make it work for node theme suggestions:
ifstatement:$alias = str_replace('-', '_', $alias);So here's what it looks like now: