I think you want a custom field handler. Check the handlers section of the Views API. See, for example, http://drupal.org/node/349178 /me stops pimping his patch now. On Wed, Jan 7, 2009 at 5:55 PM, yi yang <yang_yi_cn@yahoo.com> wrote:
All I need is just a placeholder. Say, how can I implement a hook to return a static number as a field? Is it possible? Then I can theme it to whatever I want.
--- On Wed, 1/7/09, Earl Miles <merlin@logrus.com> wrote:
From: Earl Miles <merlin@logrus.com> Subject: Re: [development] how to implement hook_views_data() and add a field? To: development@drupal.org, yang_yi_cn@yahoo.com Date: Wednesday, January 7, 2009, 2:07 PM yi yang wrote:
Hi,
All I want is just return a number, which comes from a sql query count of my custom table. I want to represent that as a field so I can adjust it's position in the views ui. It doesn't sounds like very hard, right?
Views doesn't support doing things like COUNT() in normal operation yet.
-- Ken Rickard agentrickard@gmail.com http://ken.therickards.com