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 3627666
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:55:01+00:00 2026-05-18T23:55:01+00:00

I have a Drupal site and I have setup a view to power the

  • 0

I have a Drupal site and I have setup a view to power the front page.

My goal is to be able to pass 0-2 arguments to the home page, that get passed into the view. However, I still need the normal Drupal pages to work. The list of arguments is known.

For example:

  • mysite.com/berlin/birds would pass in “berlin” as the first argument and “birds” as the second argument to the view that powers the front page.
  • mysite.com/berlin would just pass in one argument, “berlin”
  • mysite.com/admin would load the normal admin pages in Drupal

I’m not clear on how to achieve this. Is there a hook I can use? I can’t find one or think of one. Is there a way to specify this in the argument for the view itself? Perhaps I can write a hook that interjects when the URL is being loaded, and rewrite in the background?

The solution I currently have is to add these paths (since my arguments are known) to the menu system. This works, except that when I the pages they aren’t the front page, so the pages don’t use the node themes I want (they use the node details theme).

  • 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-18T23:55:02+00:00Added an answer on May 18, 2026 at 11:55 pm

    I don’t think you can really do this without custom code. The View needs a path before it starts taking arguments, and your URLs start with the arguments. What you can do is fake it with custom code. I’ve used something like this:

    /**
     * Implements hook_init().
     */
    function mymodule_custom_init() {
    
      $item = menu_get_item(); // Matching Drupal path
    
      if (!$item) { // There is no matching Drupal path.
        $_GET['q'] = 'view_path/' . $_GET['q']; // Fake path path.
      } // if
    
    } // mymodule_custom_init
    

    Then you give the view a path of “view_path” and it responds to everything that doesn’t match anything else in Drupal’s paths.

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

Sidebar

Related Questions

I have a Drupal 6 site where I've created a view that shows a
I have a rather complicated deploy setup for our Drupal site that is a
I have a Flash application that is hosted from within a Drupal page. Some
I have Drupal 5 site where a button is clicked and it calls a
I am finishing up a Drupal site and I have attached a word document
I have a Drupal module page where I am populating a form with a
I have my Drupal site here so far: selkirk.treethink.net Each Primary Link at the
I have just set up a new Drupal site, community based. there are some
(Actual site names have been changed) I installed drupal on elephantboarding.com, and it is
I want to accomplish the following scenario in Drupal: You have 2 content-types. Lets

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.