Click. Connect. Learn.

The Home page

The home page on the site is generated by PHP. It displays the 7 most recent posts from two sections that only the teacher can post in to. This way, when students log in to the site, they see the most recent teacher generated posts -- a useful feature for announcements, writing prompts, or other things of that nature.

This is created by the SQL query on the page:
The $taxo_id variables (in this case, $taxo_id1 and $taxo_id2) pull out all posts from specific terms.
To figure out the terms you want, go to administer/categories, and do a mouseover on the various "edit term" links. On the bottom left side of the page, you will see a "admin/taxonomy/edit/term/X" link -- the number that is in the "X" position corresponds to the taxonomy term referred to by the $taxo_id variable.

To expand the number of terms viewed on the page, create more $taxo_id variables, and then place those variables into the SQL query using an "OR"statement: term_node.tid = $taxo_id1 OR term_node.tid = $taxo_id2

To return the home page to the standard Drupal home page, navigate to admin/settings. Find Default home page, and change this setting to "node".

Comments

Could you explain how to

Submitted on December 19th, 2005 by albatroz

Could you explain how to create a tree-like menu similar to the one
you have on the left side of your website automatically?

A few ways to create menus

Submitted on December 19th, 2005 by Bill

There are several modules that create useful menus -- for 4.6, you can use one of several modules: Taxonomy Menu, Taxonomy_dhtml, or Menu OTF, to name three of my personal favorites. For 4.7, they have included the functionality of Menu OTF into core.

The blocks for the book module create a nice hierarchical menu automatically.

You can also create useful menus in blocks using the php block snippets from the handbook on drupal.org. The book-like navigation block could be helpful.

For this site, however, no such trickery :) I set up the menu you are asking about using the core functions of the menu module.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><b><quote><blockquote>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.