Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Rewriting Views Field Output

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:05
    with Addison Berry
  • 0:10
    So our site's looking great,
  • 0:12
    and our view is looking really good at this point,
  • 0:15
    and we can search in it and things like that.
  • 0:17
    But we have one little problem that's kind of annoying,
  • 0:21
    and that is if you click on the product name,
  • 0:24
    the link takes you to, and not
  • 0:27
    to the product node on our site.
  • 0:30
    That's a little bit weird.
  • 0:31
    But luckily, Views has an option that will let us handle this.

Rewriting Views Field Output


We’re almost done! The only problem with our view now is that clicking the titles in the view links to instead of to our own website. Fortunately, Views provides a handy trick for just this sort of situation; we can “rewrite” the output of the Title field to create a link back to its referring node instead. In this lesson, we'll:

  • Exclude a field from display
  • Rewrite the output of a field