Examples
Last modified: January 31, 2008 - 05:57
- Problem 1:
-
You want a particular node to be the first page user's see when they visit http://www.example.com (we are assuming Drupal is installed in the site's root directory).
- Solution:
-
Determine the id number of the node you wish to have Drupal redirect users to. One way to determine the node's id number is to visit the node and look at the number after the last slash in your browser's address bar. This is your node's id number. Now set the "Default front page" to "node/id#". So, assuming your node's id is "83," you would type "node/83".
- Problem 2:
-
You want user blogs to be the front page.
- Solution:
-
Set the "Default front page" to "blog".
- Problem 3:
-
You want content from a single category to appear on the front page
- Solution:
- Determine the category's id number. You can determine the id number by going to administer » categories. Roll the mouse on top of the "edit term" link next to the category to reveal the URL in your browser's status bar (usually located at the bottom of your browser's window). The number after the last slash in the URL is the category's id number. Now set the "Default front page" to "taxonomy/term/id#". If your category's id number is "5" for example, you'd write "taxonomy/term/5".
<front> placeholder. For example: <?php
$output .= l('Home', '<front>');
?>