0

Despite a previous solution to my own question, I'm not completely satisfied. I now have three exactly the same pages (page.tpl.php, page--user.tpl.php and page--user--login.tpl.php) with only a slight difference in the last page. So if I have to edit a single div for some reason, I have to change it in all three pages.

So I'm looking for a more solid solution (it will probably be in the template.tpl-file with a hook_prepare/hook_preprocess. But I have no idea how to do this... Can anyone provide me with some hints or info?

Community
  • 1
  • 1
Michiel
  • 7,855
  • 16
  • 61
  • 113

1 Answers1

2

It is not the better solution for me but you can use the arg() function in your page.tpl.php like this :

if (arg(0) == 'user') {
  // Do something
  if (arg(1) == 'login') {
    // Do something else
  }
}

Depending on your needs you may also customize your pages using only CSS rules as body tag carry some usefull classes.

DuaelFr
  • 395
  • 1
  • 5