More "Views" help??? (Ver 5.18)

Events happening in the community are now at Drupal community events on www.drupal.org.
bobmct's picture

OK - Getting closer with custom formatting of views output. With some of your help I've been able to create a custom template to control the output and modify template.php to trigger it.

Now I'm trying to access all of the fields that I defined in the Fields area of the view. I've added each desired field using the Drupal views definition screen and some of those fields are accessible in the custom tpl file I've created.
My question is: how can one identify even IF the defined fields are making it to the custom template? I've used the views tools to generate base css and tpl.php snippets but they do not contain all these fields.

After a weekend of searching, reading and trying I'm still not getting what I need. Is there a secret? Is there something I have to access in the tpl.php file other than reference the field_names? Anything I can dump within this tpl to display the field_fields available.

Thanks to anyone who reads this that can provide some insight/guidance.

Bob

Comments

get_defined_vars()

rolodmonkey's picture

It's a bit overkill, but if you are not inside of a function, you can use get_defined_vars() to get a list of all variables that are available.

<?php
$vars
= get_defined_vars();
dpm($vars);
?>

http://php.net/manual/en/function.get-defined-vars.php

Inside of a function, you can use function_get_args().

http://php.net/manual/en/function.func-get-args.php

Learn more at iRolo.net.

Thanks, Rolo, I did include

bobmct's picture

Thanks, Rolo,

I did include that function in my tpl.php file and saw the fields that were available. And I found that not all of the fields declared as fields in my view were included. I wonder why the difference? My basic understanding was that the fields defined/included in the view configuration were made available as fields to the output of the view. Any idea why that is not happening and if there's another way to obtain them? And remember, the fields I'm looking for are the ones only available in the drop down select box for Add New Field. Thanks again.

Connecticut

Group categories

County or Region

Event Type

Featured Item (Admin Only)

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: