views:

17

answers:

1

How would I approach this problem:

Background:

I have created a view that displays: Username, FirstName, LastName, Email

I have added a dropdown filter to the view display that enables the filter of users based on user terms (a user tagging module), Or interests.

That works all good.

The problem:

I now want to add a email group link at the top along side the filter drop down. This link is just an email mailto link that changes dynamically based on the fiter selection.

For example if a filter "A" is chosen and 2 people are displayed as having that tag, the email group link should include the Email address of those 2 people - pretty simple.

How do I go about adding this basic feature?

A: 

To do something like this, would probably be easiest in a preprocess function. You only need to loop through all the rows and get all the email addresses, and create the mailto link from that.

You can use the l() function to create mailto links.

googletorp
so are you saying use jquery? Is there a way to read query string to get current selected filter then build a db query based on that and render the link with the db results?
grimmersnee
@grimmersnee: googletorp is talking of PHP code, not JavaScript.
kiamlaluno

related questions