2

I used Pathauto to create URLs for my nodes like gallery/[node:title].

I created a view with an argument, and the path is gallery/% (% is the node title), but when I point my browser to that URL, I get the standard node, not the view.

How can I override the paths to get my view on that path?
How can I increase the weight of views.module?

1

To increase the weight of views.module, you can execute the following code:

db_update('system')
  ->fields(array('weight' => 10))
  ->condition('name', 'views')
  ->execute();
  • I made a mistake when I wrote the post :) the problem is still there, I need to override those and give more weight to the views so drupal will render my view instead of a normal page. – Sergiu B Mar 21 '11 at 1:08
3

I think the best option here is to actually let Panels take care of this. Install panels, create a variant of the node view panel for the specific node type(s) you want, and then place the view on the panel page. There are a few other options (hook_menu_alter(), using hook_url_alter() to rewrite the node links rather than using pathauto), but I would definitely go the panels route.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.