[support] Views Output as Link/Custom Field Handler

Ryan LeTulle bayousoft at gmail.com
Wed Apr 6 21:03:17 UTC 2011


Worth checking out if you haven't already.
http://drupal.org/project/views_customfield
<http://drupal.org/project/views_customfield>
*

Ryan LeTulle*

> bayousoft <http://twitter.com/bayousoft> -twitter








On Wed, Apr 6, 2011 at 3:58 PM, DTH <david at hartster.org> wrote:

> In my view I have a number of fields. One of these fields uses the
> Output As Link option. This works fine. However, I only want it to be
> a link if certain criteria is met - so, for example, if the field
> "sold_online" is true, then the field "price" should be a link to the
> online shop, while if "sold_online" is false, then the price should
> not be a link.
>
> What's the easiest way to do this? Write a custom field handler that
> extends what? Is it views_handler_field_url? In a custom handler, how
> do I check for the value of another field (assuming "sold_online"
> comes before "price" in my list of fields)? Or am I barking up the
> wrong tree and there's something much simpler I should do (for
> example, using theming?). (And is there a handbook page or anywhere
> where you can find a list of other people's custom view handlers?)
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110406/58284aac/attachment.html 


More information about the support mailing list