나는 사용자 지정 콘텐츠 (cck 사용) 즉, thewittyshit을 가지고 있으며 field_thewittyshit이라는 필드가 있습니다. 모든 주제에 대해 field_thewittyshit 필드를 테마로하고 싶습니다. 다음 코드를 작성하여 새로운 파일, 즉 views-view-field - default - field-thewittyshit-value.tpl.php에 저장했습니다. 그러나 여전히 내보기 또는 노드 표시에 변경 사항이 반영되지 않습니다.Drupal-6의 필드 Theming a
<?php
// $Id: views-view-field.tpl.php,v 1.1 2008/05/16 22:22:32 merlinofchaos Exp $
/**
* This template is used to print a single field in a view. It is not
* actually used in default Views, as this is registered as a theme
* function which has better performance. For single overrides, the
* template is perfectly okay.
*
* Variables available:
* - $view: The view object
* - $field: The field handler object that can process the input
* - $row: The raw SQL result that can be used
* - $output: The processed output that will normally be used.
*
* When fetching output from the $row, this construct should be used:
* $data = $row->{$field->field_alias}
*
* The above will guarantee that you'll always get the correct data,
* regardless of any changes in the aliasing that might happen if
* the view is modified.
*/
?>
<em>
<?php print $output; ?>
<em/>
텍스트 서식을 지정하고 싶습니다. 이 코드에서는 이탤릭체로 표시합니다.