Stumbled upon this lovely cheet sheet of drupal 4.7 database commands, hooks, sippets php-template variables, ect.
This is a tutorial on the theory, and methods used to create this site's multi-level top navigation menu. The tutorial covers everything from obscure drupal php fuctions to generate custom dynamic menus, to advanced CSS techniques and practices. Warning: this tutorial will forever change the way you see drupal's navigation, and CSS. That's a promise (so long as you aren't already an expert).
In this tutorial, I will explain how to generate custom menus that are fully controlled from the menu administration page. (path: [www.yourdrupalsite.com]admin/menu). These menus can be enormously useful. The can be used for everything from custom user interfaces, to navigation menus. In addition, since they are hooked into Drupal's core, they can be dynamically updated.
In writing this tutorial, I've assumed that the reader already understands to some extent:
Alright, we're going to call a php function. O, non-php programmers do not flee in horror. PHP is easy, unless you're paying me, in which case its very difficult.
One powerful trick to improving the way a drupal site flows is switching page templates when certain PHP arguments return true. This is a quick tutorial on how to do that.
Step One: make three copies of page.tpl.php and the name them "frontpage.tpl.php", "admin.tpl.php", and "inside.tpl.php".
Step Two: Open page.tpl.php with an editor. Erase everything.. and I do mean everything, we're building this from the ground up. (get the coffee ready)
Step Three: copy the following code into page.tpl.php:
<?phpif (arg(0) == 'admin') { include "admin.tpl.php";} if ($is_front) { include "frontpage.tpl.php"; return;}else { include "inside.tpl.php";?>
Step Four:Test to make sure that indeed your different templates are
Recent comments
21 hours 31 min ago
22 hours 41 min ago
2 days 3 hours ago
3 days 13 hours ago
5 days 15 hours ago
6 days 7 hours ago
6 days 19 hours ago
6 days 19 hours ago
6 days 23 hours ago
6 days 23 hours ago