~pwolanin/+junk/AD-pressflow-6

« back to all changes in this revision

Viewing changes to modules/acquia/cck/help/theme-field-templates.html

  • Committer: Peter Wolanin
  • Date: 2009-09-17 21:56:51 UTC
  • Revision ID: pwolanin@curie.local-20090917215651-jm4azy7ee79zx5bz
   Acquia Drupal 1.2.16 (Drupal 6.14 core) has just been released and
   contains important security updates and bug fixes. We recommend that
   you update to the new version as soon as possible.
    1. Please reference the [1]Getting Started Guide for information about
       updating your site.
    2. Next, [2]download the new version.

   Acquia Drupal consists of Acquia's package of Drupal core with a
   curated set of contributed modules, plus the ability to connect to the
   Acquia Network. 
   Acquia Drupal 1.2.16 (Drupal 6.14 core) includes the
   following updates: 
   ===================================================
     * Updated Drupal core to version [3]6.14. This also fixes a multiple
       security issues described in [4]DRUPAL-SA-CORE-2009-008.
     * Updated the Date module to [5]6.x-2.4. This also fixes a Cross Site
       Scripting security issue described in
       [6]DRUPAL-SA-CONTRIB-2009-057.
     * Added the jquery_ui module, version [7]6.x-1.3. This fixes a
       warning that appears on the status page if you have the date_popup
       module enabled.
     * Updated the Content Construction Kit (CCK) module to [8]6.x-2.5.
     * Updated the Image module to [9]6.x-1.0-beta3.
     * Updated the Mollom module to [10]6.x-1.10.
     * Updated the Voting API module to [11]6.x-2.3.

References

   1. http://acquia.com/documentation/getting-started/introduction
   2. http://acquia.com/downloads
   3. http://drupal.org/node/579476
   4. http://drupal.org/node/579482
   5. http://drupal.org/node/579000
   6. http://drupal.org/node/579144
   7. http://drupal.org/node/497608
   8. http://drupal.org/node/539128
   9. http://drupal.org/node/575958
  10. http://drupal.org/node/551398
  11. http://drupal.org/node/550092

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- $Id: theme-field-templates.html,v 1.1.2.4 2008/12/08 20:00:35 yched Exp $ -->
 
2
<p>Field-level theming determines how the values of a given field are
 
3
displayed. The resulting output ends up in the <span class="code">$content</span>
 
4
and <span class="code">$&lt;FIELD_NAME&gt;_rendered</span> variables in the node
 
5
templates.</p>
 
6
 
 
7
<h3>Template files</h3>
 
8
 
 
9
<p>In order to customize field themeing:</p>
 
10
 
 
11
<ul>
 
12
  <li>
 
13
    Copy the <span class="code">content-field.tpl.php</span> template file into
 
14
    your theme's root folder (please keep the contents of the
 
15
    <span class="code">cck/theme</span> folder untouched. For the same reason,
 
16
     need to copy the file instead of just moving it).
 
17
  </li>
 
18
  <li>
 
19
    Edit that copy to your liking. See the comments in
 
20
    <span class="code">cck/theme/content/content-field.tpl.php</span> for a list
 
21
    of all variables available in this template.
 
22
  </li>
 
23
</ul>
 
24
 
 
25
<h3>Template suggestions</h3>
 
26
 
 
27
<p>In addition, the theme layer will also look for field-specific variants
 
28
(suggestions), in the following order of precedence:</p>
 
29
 
 
30
<dl>
 
31
  <dt>content-field-&lt;FIELD_NAME&gt;-&lt;CONTENT_TYPE_NAME&gt;.tpl.php</dt>
 
32
  <dd>
 
33
    ex: <span class="code">content-field-field_myfield-story.tpl.php</span> -
 
34
    If present, will be used to theme the 'field_myfield' field when displaying
 
35
    a 'story' node.
 
36
  </dd>
 
37
 
 
38
  <dt>content-field-&lt;CONTENT_TYPE_NAME&gt;.tpl.php</dt>
 
39
  <dd>
 
40
    ex: <span class="code">content-field-story.tpl.php</span> - If present,
 
41
    will be used to theme all fields of 'story' nodes.
 
42
  </dd>
 
43
 
 
44
  <dt>content-field-&lt;FIELD_NAME&gt;.tpl.php</dt>
 
45
  <dd>
 
46
    ex: <span class="code">content-field-field_myfield.tpl.php</span> -
 
47
    If present, will be used to theme all 'field_myfield' field in all the
 
48
    content types it appears in.
 
49
  </dd>
 
50
 
 
51
  <dt>content-field.tpl.php</dt>
 
52
  <dd>
 
53
    If none of the above is present, the base template will be used.
 
54
  </dd>
 
55
</dl>
 
56
 
 
57
<strong>Important:</strong>
 
58
<ul>
 
59
  <li>
 
60
    Suggestions work only if the theme also has the base template file.
 
61
    If your theme has <span class="code">content-field-*.tpl.php</span> files,
 
62
    it must also have a <span class="code">content-field.tpl.php</span> file.
 
63
  </li>
 
64
  <li>
 
65
    Whenever you add new template files in your theme, you need to
 
66
    rebuild the theme registry, or the theme engine won't see them.<br/>
 
67
    You can do that by :<br/>
 
68
    - visiting the <a href="&base_url&admin/build/modules">Administer modules</a> page<br/>
 
69
    - or using <a href="http://www.drupal.org/project/devel">Devel module</a>'s
 
70
    'clear cache' link.
 
71
  </li>
 
72
</ul>
 
73
 
 
74
<p>See the <a href="http://drupal.org/node/223440">Working with template suggestions</a>
 
75
section of the <a href="http://drupal.org/theme-guide">Theme guide for Drupal 6</a>
 
76
for more informations about templates and template suggestions.</p>
 
 
b'\\ No newline at end of file'