Free Website Tips
Recent Twitter Posts
Clients Include




Create a quick custom HTML password protected page in Drupal
Last week one of our clients started marketing a Drupal-driven, web dashboard application we've been secretly building for nine months. To help their sales person impress clients, I used Camtasia for the Mac (I love that it is so much cheaper than the Windows version - go figure!) and did a video overview of the system. Then I exported it to the HTML page Camtasia builds since I just needed something quick and dirty.
The industry is highly competitive, so after the demos we needed to prevent future access to the video. For the first demo, we just uploaded it to a directory on our client's website, then renamed the directory minutes after the demo finished. Worked like a charm, but as they begin doing demos for many people every week, we needed a long-term solution that they could manage.
Obviously, tying in with Drupal's user administration would be ideal. First, I searched for something I thought would exist (maybe it does and my Googling was just lacking) - a Drupal module that allows full HTML pages at specific URLs. Nada. Fine, we can do this the hard way. I quickly put together a custom content type with a custom page-[content type].tpl.php file loaded by template.php baed on the $node->type and having the HTML in there. This did work. It was just ugly. Plus, we needed to direct these "beta demo" users to the video page as soon as they logged in. Well, that's simple enough, you just use the Front Page module. (Ah-ha!)
We already had the Drupal Front Page module installed and - guess what - it has a setting allowing you to direct users to a full HTML page that you enter right into the module. Simple.
Now we have a great setup where the client can create a new beta demo user, the user logs in and is immediately taken to the video, and then the client can disable the user account as soon as they are finished!
Here is a snippet of our Front Page settings:




