I have a Unformatted view that uses CCK fields. I have an overridden theme for the view. When I look at the fields and the data I am getting the raw values instead of the formatted values. How do I get the formatted values?

Basically the CCK field is a select 0 => No, 1 => Yes, etc. In the view I get a 0 or a 1...I want the "No" or "Yes". On themes that are not overridden that is what I get. When I create my own theme I cannot get the formatted values. Any help would be appreciated.

Comments

heather’s picture

Sorry I don't know your answer... maybe this can help though you may already know this:
by adding the following code to your template file to just read out some values which are available to you. (even just temporarily - paste this in, run your .tpl.php file once, and view source and save the info for reference.)

<?php
print '<pre>';
print_r(get_defined_vars());
print '</pre>';
?>
merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

If your problem deals exclusively with fields or filters provided by another module (CCK, Image, VotingAPI are common) please post the issue under the queue for that module first; all modules are responsible for telling Views about their own fields. It's possible Views IS at fault, but the module maintainers are the best people to make that determination, and they can kick the issue into the Views queue with an explanation of what's wrong if that is the case.

In addition to having probably filed this in the wrong place, when asking questions like this it is really important to include things like which styles/templates you're actually using, since each one is its own entity.

I'm going to mark this NMI and, for a change, NOT forward this to CCk as I"m not 100% sure it needs to be filed there, but it definitely can't be properly answered without more information.

domesticat’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Performing a mass closing of all issues over 180 days old. Please reopen if needed.