You are here

Blog

Drupal 6.x - Use path alias as views argument to display blocks on specified pages

The idea here was to create multiple slide shows and display each one on a different page based on the path of the page and not the node id (because some pages are views)

First, the slide show is created with Views Nivo Slider module, and a content type setup with a multi value image field and a "path" text field where you type the path where you want to slide show to appear on. example: about-us

then you create the view using the views nivo slider setting, and make sure when you add the image field that you de-select the group multiple values. So each image will populate the slide show.

Finally you add your "path" field as an argument and set the following:

*provide default argument

*Type - php code:

$path = drupal_get_path_alias($_GET['q']);
return $path;

Validator: basic validation

and thats it!

just place your block and you're ready to create your slide shows.

Drupal
Path Auto

Need A Developer? Contact Us