views:

382

answers:

1

I currently have a view (Drupal 6 using Views2) that properly aggregates a custom content type (videos) and filters them for a page display. When I create a block display, it previews the results in live preview just great, but when i go to the page expecting to see the block it doesn't appear.

I'm fairly certain the argument I'm attempting to pass it fails because when I select "Display all results" for "Action to take if argument does not validate:" the block shows up on the page just fine.

Any advice definitely appreciated.

A: 

you can use PHP code in the 'provide default argument' section. assuming you're using a menu callback to apply the argument you can do this:

<?php

if(args(0) == 'your-menu-path' && args(1) != ''){
    return args(1)
}

?>

make sure you pass a default argument to 'views-embed-view()' if you're using it to place the view on your page otherwise it won't show up at all.

corneliusk