Passing location info to views to create dynamic newsletter

scalp - October 17, 2009 - 19:24
Project:Simplenews
Version:6.x-1.0-rc6
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I have been plugging away at this for a while now to no avail. I can create a newsletter and send it, no problem. I can embed views using views_embed_view, no problem. What I want to do now is introduce a filter on the views that I'm calling that uses the Location module to filter items based on a user's location. Does anyone have any ideas on this one? I'm guessing that I'll need to pass an argument with the function, but I don't know what I should pass and once in the view I don't know what to set as an argument to make this work. Here's what I'm working with now:

This is some sample text that could be used to introduce the newsletter. It should be boiler plate that can be used over and over again without needing to be changed because the rest of the newsletter will be dynamically setup with Views.

<?php
print views_embed_view ('view1', 'default');
print
views_embed_view ('view2', 'default');
print
views_embed_view ('view3', 'default');
print
views_embed_view ('view4', 'default');
?>

This is sample footer text that should again be boiler plate.

Thank you in advance for any responses. I've seen some issues relating to adding patches so that you can use a user's name in the newsletter, but these don't seem to be what I'm looking for. Completely hitting a mental road block on this one. Please help!

 
 

Drupal is a registered trademark of Dries Buytaert.