A Drupal Views Quirk

I do want to write about some more conceptual aspects of Drupal, but in the meantime here is a (possibly obscure) quirk:

The Views module allows you to apply a custom format to a field, but it can get a bit tricky if you want the value in a field to appear more than once, each time formatted differently. A similarly tricky matter can arise if you tweak the format of a field, change your mind about displaying it, and later want to display a custom field based on the original field.

I'm using Drupal 7 and Views 3, but I think this applies to Drupal 6 and/or Views 2 as well.

For clarity, suppose that A is a field in the view.

Now suppose you want to display two fields:

A': a slightly tweaked version of A.

B: a differently tweaked version of A.

Now, recall that a modification of a field display specifies the field that it's based on. You can only base a field display on the value of a field that has already been rendered. Thus, for B, you would essentially say "a different tweak(A)". However, the Views UI confuses A and A'. Thus while you think you're tweaking A, you're really tweaking A'.

Put this way, the solution is clear. Make both A and A' distinct fields of the view to be rendered, but don't display A. Given the explicit choice, it's clear that B should be based off of A.

Tags: 

Comments

Mollom privacy policy.

Hello dear .You put really very helpful information.
It’s pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before.
http://www.iplt20livestream.com/
http://www.icct20worldcup2016livestreaming.com
http://www.icct20worldcup2016livestreaming.com
http://www.laligalivestreaminghd.com/
http://www.indiavspakistanliveonline.com
http://www.indiavspakistanliveonline.com/2016/02/india-vs-pakistan-live-...

Actually this is really what am i looking for and the main thing is that IPL t20 is now online So If you wanna see this then IPL t20 2016 go to this website and see the real thing gseb result now declared so check it now.....

Wonderful beat ! I wish to apprentice while you amend your site, how could i subscribe for a blog website? The account aided me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear concept

http://french-open-20164.webnode.com/

http://jasonmemiler.nation2.com/

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.