Skip to main content

Drupal : How to write the theme's region variables to the page.

If you're assigning your region to page.tpl.php, you don't need to worry about creating a variable for your region and assigning content to it; PHPTemplate handles this automatically. All you need to do is write the variables to the page, by editing your theme's page.tpl.php file. For each new region you've defined, include in page.tpl.php a print call. For the 'floater' region defined above, this would look like:

.

Of course, you'll probably want to use HTML, CSS, and possibly PHP (e.g., if tests) to get your new regions looking how you want them.

Comments

Popular posts from this blog

Replace a String in Multiple Files in Linux Using Grep and Sed

Command grep -rl matchstring somedir/ | xargs sed -i 's/string1/string2/g' Note: The forward slash '/' delimiter in the sed argument could also be a different delimiter (such as the pipe '|' character). The pipe delimiter might be useful when searching through a lot of html files if you didn't want to escape the forward slash, for instance. matchstring is the string you want to match, e.g., "football" string1 would ideally be the same string as matchstring, as the matchstring in the grep command will pipe only files with matchstring in them to sed. string2 is the string that replace string1. Example grep -rl '5.00.00.40' ./ | xargs sed -i 's/5.00.00.40\/vc/5.79.17.43\/BB/g' Extracted from : http://vasir.net/blog/ubuntu/replace_string_in_multiple_files/

Installing Apache, PHP, MySQL and phpMyAdmin on Ubuntu

Installing Apache 1. Open Terminal (Application -> Accessories -> Terminal) and execute the following command: sudo apt-get install apache2 2. When the setup is complete you can check if the Apache is working properly by pointing your browser to http://localhost. If you see the text “It works!”, it means Apache is working just fine. 3. Towards the end of the installation if you see a message like this inside Terminal, “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName“, you can fix this by executing the following command. It will open Gedit (text editor). gksu gedit /etc/apache2/conf.d/fqdn 4. When Gedit opens, type “ServerName localhost” inside the file and click Save. Then close the file. Installing php5 1. Inside Terminal, execute the following command: sudo apt-get install php5 libapache2-mod-php5 2. When setup is complete, you have to restart Apache so that php5 will work on Apache. Execute t...