Drupal Subtheming nightmare with a happy ending

Im modifying the user login form of a normal Drupal installation using the adaptative theme. so far so good, until i started to create some template suggestion files for my subtheme.

The tpl in question is named block-user.tpl.php. So i create my .tpl file and put all the needed stuff inside it. Then I put it in the template directory of my subtheme and .. it didnt work.

  • For now the file was in /sites/all/themes/adaptativetheme/subtheme/template/block-user.tpl

The second thing I did to make it work was copying that file on the template directory of the adaptative theme ( the father of my subtheme), and it works!. But why it didnt work on my subtheme?
  • The copied file was in /sites/all/themes/adaptativetheme/adaptative/template/block-user.tpl and also in:
  • /sites/all/themes/adaptativetheme/subthemename/template/block-user.tpl

The Fix
Apparently you have to had a copy of all the parent templates in your template directory. So the parent .tpl file of block-user.tpl.php is block.tpl.php. Its a bug in Drupal6, live with it because it wont be fixed. Why it works on the theme instead of the subtheme, because the Adaptative theme has that file by default. So I copy that file on my subtheme.. to no avail.

Clearing the Cache
I had the Rebuild the theme registry on every page load option on, so i wonder why it didnt work. I cleared all the cache ( Its an options that appears in the module Administration Menu, a must have module ), and Voila!, it worked in my subtheme!, so you must clear the cache when seeing funny stuff happening with your tpl files.

Optional Life Savier Info
Also they must be in the same directory as the parents of your subtheme. So if your main theme saves all our .tpl files in the templateyeah carpet, you need to create the same carpet in your subtheme.

Hope this little article help someone drupaling. Happy coding!

Aptana 3 Color schema sucks (and the remedy)

So you installed the new Aptana 3 beta, but suddenly all your code its invisible to your eyes, including the cursor, yes, the cursor is, for some unknow reason, invisible to a normal human being.

And that's the reason, you shouldn't smoke crack cocaine when devising the new color schema of Aptana.

But dont worry, after some googling i found how you can change this to a more acceptable color schema.

1) Open your Aptana an go to the menu Windows->Preferences


2) Change the eyeburning theme to any other theme, god ,any other theme will do it fine. Just select Aptana->Theme and you will see something like the photo below:



BONUS PACK: How about the variable highlight, it just messing up my retina!!!!. Well I finally found where is the option to change it so it will look like this:



Well today is your luck day. Just follow this guide:

1) Go again to Windows->Preferences, and then navigate to Aptana ->PHP -> Mark Ocurrences . TIP: If you want to dissable it all, just uncheck all the options here and forget abot the rest.

2) Do you see the link called annotation up there?, just click it and you will see the next windows:


3) Here you will have to modified two options PHP Read Ocurrences and PHP Write Ocurrences, does those name make sense to you? neither to me, but what the heck, Aptana rules but the color schema suck, but you can change it anyway so enjoy it.