Set views title dynamically for blocks and pages

Tested on: Drupal 5.x – Views 1.6

Problem: you want to display a taxonomy term name as view title, for block and themes.

Solution: On views edit screen, just add to your Argument > Argument handling code:

$args[0] = 3;

Where 3 is the Term ID you want to display as name. When term name will be updated, view title will be updated too.

You haven’t to add other arguments via GUI, just this code.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s