(Tutorial) A breif Theme Tutorial for Drupal
Tutorial : A breif Theme Tutorial for Drupal
These are the notes I kept when building my new theme, they are not all inclusive, but I figured they may be of help to a few others who are customizing their Drigg sites.
1. Copy this code above the </head> tag in page.tpl.php
<!-- REMOVE these if you are using jquery-update!! -->
<script type="text/javascript" src="/misc/collapse-fix.js"></script>
<script type="text/javascript" src="/misc/compat-1.0.js"></script>
<?php
if (module_exists('extra_voting_forms')) {
print extra_voting_forms_insert_js_css();
}
?>
2. If you want to use drigs menu system you will need to past this code into page.tpl.php, I chose not to use it.
<?php if (module_exists('drigg')) { ?>
<div id="header_categories">
<?php
if (module_exists('drigg')) {
print drigg_get_submit_button();
}
?>
<?php print theme_drigg_sections() ?>
</div>
<?php } ?>
3. If your theme does not have breadcrumbs you will need to find a location for this code in page.tpl.php, mine was already breadcrumb ready
<?php if (!empty($breadcrumb)): ?>
<div id="header_breadcrumb">
<?php print $breadcrumb; ?>
</div>
<?php endif; ?>
4. Find <?php print $title; ?> replace block in page.tpl.php with
<div id="content_center" class="column">
<div class="controlbar clearfix">
<?php if (!empty($title) && !( arg(0) == 'node' && is_numeric(arg(1)))) : ?>
<h1><?php print $title; ?></h1>
<?php endif; ?>
<?php
if ($page == 0 && module_exists('drigg')) {
print drigg_get_view_type_menu();
print drigg_get_order_menu();
}
?>
</div>
5. I copied the entire node.drigg.tpl.php, comment.tpl.php, node-forum.tpl.php, favicon.ico and box.tpl.php files to my new theme folder
6. I ignored node.tpl.php for the time being since I think drigg relies soley on node.drigg.tpl.php
7. I ignored template.php and block.tpl.php
8. My new theme has a settings.php which I also ignored
Courtesy:- drigg-code.org
- guru's blog
- Login to post comments
![Drupal-6-Book-[Building Powerful and Robust Websites with Drupal 6].jpg](http://www.drupalranch.com/images/Drupal-6-Book-[Building%20Powerful%20and%20Robust%20Websites%20with%20Drupal%206].jpg)