Темизация cck поля

Главные вкладки

Аватар пользователя ciberlex404 ciberlex404 24 января 2011 в 21:07

У меня на сайте есть cck поле field-source
Прочитав статью http://xandeadx.ru/blog/drupal/263 сделал подобное у себя на Гарланде

и.... не работает... кеш сбросил...несколько раз.. да и в файле "кастыль" вставил - кусок html \что бы увидеть зацепился ли теплейт.
В итоге выяснил что темплейт drupal не зацепил.
Куда класть файл content-field-field-source.tpl.php ??
сейчас лежит в /themes/garland - неработает.

содержание файла

<?php
// $Id: content-field.tpl.php,v 1.1.2.5.2.1 2009/09/11 09:21:22 markuspetrux Exp $

/**
 * file content-field.tpl.php
 * Default theme implementation to display the value of a field.
 *
 * Available variables:
 * - $node: The node object.
 * - $field: The field array.
 * - $items: An array of values for each item in the field array.
 * - $teaser: Whether this is displayed as a teaser.
 * - $page: Whether this is displayed as a page.
 * - $field_name: The field name.
 * - $field_type: The field type.
 * - $field_name_css: The css-compatible field name.
 * - $field_type_css: The css-compatible field type.
 * - $label: The item label.
 * - $label_display: Position of label display, inline, above, or hidden.
 * - $field_empty: Whether the field has any valid value.
 *
 * Each $item in $items contains:
 * - 'view' - the themed view for that item
 *
 * see template_preprocess_content_field()
 */

?>
<?php 
if (!$field_empty) : ?>
<div class="field field-type-<?php print $field_type_css ?> field-<?php print $field_name_css ?>">
  <div class="field-items">
    <?php $count 1;
    foreach (
$items as $delta => $item) :
      if (!
$item['empty']) : ?>
        <div class="field-item <?php print ($count 'odd' 'even'?>">
          <?php if ($label_display == 'inline') { ?>
            <div class="field-label-inline<?php print($delta '' '-first')?>">
              <?php print t($label?>:&nbsp;</div>
          <?php ?>
          <?php print $item['view'?>
        </div>
      <?php $count++;
      endif;
    endforeach;
?>
  </div><b>====</b>
</div>
<?php endif; 

?>

Комментарии

Аватар пользователя ciberlex404 ciberlex404 24 января 2011 в 21:11

Короче говоря мне нужно свои шаблоны темизации для каждого типа материала.
и убрать "лейблы" у cck полей.
Собственно последнее пытался сделать вsit указанным файлом.

Аватар пользователя xxandeadxx xxandeadxx 24 января 2011 в 21:25

"ciberlex404" wrote:
У меня на сайте есть cck поле field-source

field-source быть не может, может только field_source

"ciberlex404" wrote:
content-field-field-source.tpl.php

content-field-field_source.tpl.php

"ciberlex404" wrote:
и убрать "лейблы" у cck полей.

настройки отображения полей

Аватар пользователя Лексей Лексей 24 января 2011 в 21:24

Лейблы у ССК полей убираются во вкладке Отображение полей...

Я поля ССК в материалах темизирую классами в css своей темы

Аватар пользователя ciberlex404 ciberlex404 24 января 2011 в 21:42

интересует оставить контент поля а подпись убрать
Я верно понял
это и есть решение?

"Лексей" wrote:
Лейблы у ССК полей убираются во вкладке Отображение полей...
Я поля ССК в материалах темизирую классами в css своей темы