[support] Confessions of a Drupal Hacker 1
Larry Garfield
larry at garfieldtech.com
Fri Nov 16 01:06:29 UTC 2007
On Thursday 15 November 2007, Fred Jones wrote:
> I know PHP/MySQL and I am learning Drupal. I like it very much, but
> there are some things which I have not found a way to do so I just code
> them myself in PHP.
>
> Here are two examples to start:
>
> 1. A Contact Us page which returns the data submitted to the user. I
> mean that the page displays the email and message submitted.
Form-alter the contact form to add your own submit handler.
Mail-alter the message that is being sent and just store the value of the
message to a variable with variable_set(). You'll probably want to key it
per-user.
In the submit handler, redirect to a custom menu callback.
Add a custom menu callback, and in that callback pull the value from the
variable you set earlier and display it as the body of the page. The delete
the variable. If the variable is not set, just redirect to the contact form.
There may be an easier way, but that's the first that comes to mind.
> 2. A nested navigation UL based on a taxonomy vocabulary. What I mean is
> that I have an estore and the categories of products are stored as terms
> in a certain vocabulary. I want to display links to each category page
> as nested UL lists, so that Shoes is one link and inside of it is
> another UL with Men's Shoes and Womens' Shoes, each also a link to that
> category.
I am pretty sure there's a module that creates menu blocks out of taxonomy.
Search for "site map", restricted to project nodes.
--
Larry Garfield AIM: LOLG42
larry at garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
More information about the support
mailing list