Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 355643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:02:13+00:00 2026-05-12T12:02:13+00:00

I am currently working on a website which lists the businesses as per either

  • 0

I am currently working on a website which lists the businesses as per either their location or the category to which it belongs. Check: http://frugalmillionaire.net/

Existing Functionality implemented (Views, CCK and Taxonomy):

On clicking the Primary Menu Links the Business Category are passed as an argument to the View. Hence the view displays the business listings of the specific category only. Also to implement the Find Local Coupons Block ; a filter of the same view is exposed in a block.

My client wants to give the user the option to set his/her location on the website . Once the user sets that location then upon clicking the links in the primary menu (Restaurant) should list only the restaurants which are of the location set. Similarly clicking on any of the primary menu links should display of the businesses of the location set only.

Potential ways to do it :
1)Set the value selected by the user in the exposed filter. How can this be done?
2) Using Cookies. Can I use the Drupal Cookie to somehow achieve this?

Kindly help me out .
Any help/pointers/relevant links would be deeply appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T12:02:13+00:00Added an answer on May 12, 2026 at 12:02 pm

    I think you are asking three different things.

    1. How do you get location information from the current user and store it?
    If the user is setting and forgetting their location, make a Profile Field. The Location module might be of help. If the user just types in a location for temporary usage, save it to their session.

    2. How do you theme a site based on the user’s location?
    hook_menu_alter() can be used to change what your primary links are doing based on user data.

    3. How do you preload the business Views based on this location?

    1. Invoke the View programmatically,
      where location information (when
      available) is inserted in place of
      the exposed filters. Useful Views Documentation.

    2. Set the relevant information in your
      View with Arguments. Set the default
      to the user’s location. Because you are relying on a dynamic default, you never need to send a “real” argument to the view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.