<p>You may use any of the following possible theme files to modify individual parts of your view. In total, there are four parts to theming a view.</p>
<ul>
<li> The <strong>display</strong> theme is usually views-view.tpl.php and it largely controls the decorations around a view; where the header, footer, pager, more link, feed icon, etc, will be placed. </li>
<li> The <strong>style</strong> will control how all of the results of the display are put together. It may be as simple as just displaying all of the rows, or it may be a complex table generator or something in between. </li>
<li> The <strong>row</strong> style controls each individual row; not all styles utilize the row style (notably the table), but most others do.
<li> Finally, <strong>field</strong> themes allow you to override the look and even the data of each individual field, if the style uses fields. The actual template the system will use should be hilighted in <strong>bold</strong>.</li>
</ul>
<p>The link to the left of each type will give you information about the default template used for that type. You may cut and paste this and place it in your theme with the appropriate template, or you may copy the base file from the views/theme directory (or, if provided by a module, from the module's directory). <strong>It is important that you clear the theme registry cache every time you add a new template, or the new template will not be picked up.</strong></p>
<p>Also, this feature will only work properly with Drupal 6.3 and later; prior to Drupal 6.3 <ahref="http://drupal.org/node/241570">this patch</a> will be required.</p>
@@ -1020,6 +1020,7 @@ class views_plugin_display extends views_plugin {
...
@@ -1020,6 +1020,7 @@ class views_plugin_display extends views_plugin {
break;
break;
case'analyze-theme':
case'analyze-theme':
$form['#title'].=t('Theming information');
$form['#title'].=t('Theming information');
$form['#help_topic']='analyze-theme';
$funcs=array();
$funcs=array();
// Get theme functions for the display. Note that some displays may
// Get theme functions for the display. Note that some displays may
...
@@ -1052,12 +1053,6 @@ class views_plugin_display extends views_plugin {
...
@@ -1052,12 +1053,6 @@ class views_plugin_display extends views_plugin {
}
}
}
}
$form['markup']=array(
'#prefix'=>'<div class="form-item description">',
'#suffix'=>'</div>',
'#value'=>'<p>'.t('You may use any of the following possible theme files to modify individual parts of your view. In total, there are four parts to theming a view. The <strong>display</strong> theme is usually views-view.tpl.php and it largely controls the decorations around a view; where the header, footer, pager, more link, feed icon, etc, will be placed. The <strong>style</strong> will control how all of the results of the display are put together. It may be as simple as just displaying all of the rows, or it may be a complex table generator or something in between. The <strong>row</strong> style controls each individual row; not all styles utilize the row style (notably the table), but most others do. Finally, <strong>field</strong> themes allow you to override the look and even the data of each individual field, if the style uses fields. The actual template the system will use should be hilighted in <strong>bold</strong>.').'</p>',
);
$form['important']=array(
$form['important']=array(
'#prefix'=>'<div class="form-item description">',
'#prefix'=>'<div class="form-item description">',
'#suffix'=>'</div>',
'#suffix'=>'</div>',
...
@@ -1792,6 +1787,7 @@ class views_plugin_display_page extends views_plugin_display {
...
@@ -1792,6 +1787,7 @@ class views_plugin_display_page extends views_plugin_display {
switch($form_state['section']){
switch($form_state['section']){
case'path':
case'path':
$form['#title'].=t('The menu path or URL of this view');
$form['#title'].=t('The menu path or URL of this view');
$form['#help_topic']='path';
$form['path']=array(
$form['path']=array(
'#type'=>'textfield',
'#type'=>'textfield',
'#description'=>t('This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for arguments: For example, "node/%/feed".'),
'#description'=>t('This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for arguments: For example, "node/%/feed".'),
...
@@ -1801,6 +1797,7 @@ class views_plugin_display_page extends views_plugin_display {
...
@@ -1801,6 +1797,7 @@ class views_plugin_display_page extends views_plugin_display {