theme.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. <h3>Printing the $skinr variable</h3>
  7. <p>The <code>$skinr</code> variable should be printed in the class attribute of
  8. the first, or outer-most <code>&lt;div&gt;</code> in your theme's template
  9. files. The variable is the same no matter which type you are dealing with, but
  10. you may need to add template files to your theme. The variable is added by
  11. doing:
  12. </p>
  13. <pre>&lt;?php print $skinr; ?&gt;</pre>
  14. <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>
  15. <pre>&lt;?php print ' '. $skinr; ?&gt;</pre>
  16. <h3>Template files needed in your theme</h3>
  17. <p>Here is a list of template files that are typically used and supported by
  18. Skinr. See the link for each if you need to create these from scratch in your
  19. theme. These links point to Drupal's default code for the template files.
  20. You'll be able to copy/paste that code or tpl file to your theme. Then you can
  21. add the <code>$skinr</code> variable and modify the code to suit your needs.
  22. </p>
  23. <ul>
  24. <li><a href="http://api.drupal.org/api/drupal/modules--system--block.tpl.php/6/source">block.tpl.php</a></li>
  25. <li><a href="http://api.drupal.org/api/drupal/modules--node--node.tpl.php/6/source">node.tpl.php</a></li>
  26. <li><a href="http://api.drupal.org/api/drupal/modules--comment--comment-wrapper.tpl.php/6/source">comment-wrapper.tpl.php</a></li>
  27. <li><a href="http://drupalcode.org/viewvc/drupal/contributions/modules/views/theme/views-view.tpl.php?view=markup">views-view.tpl.php</a></li>
  28. <li><a href="http://drupalcode.org/viewvc/drupal/contributions/modules/panels/templates/panels-pane.tpl.php?view=markup">panels-pane.tpl.php</a></li>
  29. </ul>
  30. <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>