[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/skinr/help/ -> theme.html (source)

   1  <p>Skinr creates a variable containing your skins class that you need to print
   2    inside your template files. Thankfully this will not be necessary in Drupal 7,
   3    but for now you'll need to add the <code>$skinr</code> variable and all the
   4    template files you plan to use yourself.
   5  </p>
   6  
   7  <h3>Printing the $skinr variable</h3>
   8  
   9  <p>The <code>$skinr</code> variable should be printed in the class attribute of
  10    the first, or outer-most <code>&lt;div&gt;</code> in your theme's template
  11    files. The variable is the same no matter which type you are dealing with, but
  12    you may need to add template files to your theme. The variable is added by
  13    doing:
  14  </p>
  15  
  16  <pre>&lt;?php print $skinr; ?&gt;</pre>
  17  
  18  <p>NOTE: Depending on how your template files are structured, you may need to add a blank space before the variable so it doesn't conflict with other classes you might have:</p>
  19  
  20  <pre>&lt;?php print ' '. $skinr; ?&gt;</pre>
  21  
  22  <h3>Template files needed in your theme</h3>
  23  <p>Here is a list of template files that are typically used and supported by
  24    Skinr. See the link for each if you need to create these from scratch in your
  25    theme. These links point to Drupal's default code for the template files.
  26    You'll be able to copy/paste that code or tpl file to your theme. Then you can
  27    add the <code>$skinr</code> variable and modify the code to suit your needs.
  28  </p>
  29  
  30  <ul>
  31    <li><a href="http://api.drupal.org/api/drupal/modules--system--block.tpl.php/6/source">block.tpl.php</a></li>
  32    <li><a href="http://api.drupal.org/api/drupal/modules--node--node.tpl.php/6/source">node.tpl.php</a></li>
  33    <li><a href="http://api.drupal.org/api/drupal/modules--comment--comment-wrapper.tpl.php/6/source">comment-wrapper.tpl.php</a></li>
  34    <li><a href="http://drupalcode.org/viewvc/drupal/contributions/modules/views/theme/views-view.tpl.php?view=markup">views-view.tpl.php</a></li>
  35    <li><a href="http://drupalcode.org/viewvc/drupal/contributions/modules/panels/templates/panels-pane.tpl.php?view=markup">panels-pane.tpl.php</a></li>
  36  </ul>
  37  
  38  <p>Note: If you have other template files, i.e. node-blog.tpl.php make sure you print the <code>$skinr</code> variable in them, otherwise it wont work.</p>


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7