Welcome To Snipplr


Everyone's Recent Snippets Tagged drupal



This is a stipped-down version of the original page.tpl.php from Drupal 5.x's Bluemarine theme. Just add your own DIVs.
2 551 posted 15 years ago by panatlantica
View to use with the docs at http://drupal.org/node/144725 for creating image gallery using cck, views and thickbox.
3 697 posted 15 years ago by shrop
A Views export for Drupal 5. A block that only site admin and site manager roles can access, showing unpublished comments for blog entry content type.
3 685 posted 15 years ago by shrop
1 567 posted 15 years ago by sherakama
Add this arg code plus set first argument as "OG: Group nid(s)"
2 489 posted 16 years ago by metareason
This is a snippet I did for a project-- it relies on Drupal and the Flickr module for Drupal.
4 613 posted 16 years ago by dewolfe001
Say you wanted the following 4 tabs: bodoni, helvetica, frutiger, univers, each outputting a separate block view of 3 teasers each. This is what your markup would look like:
1 495 posted 16 years ago by zachharkey
The following block should live in your theme's page.tpl.php
2 536 posted 16 years ago by zachharkey
A per-region override. ogt_blocks is ran for a region, if a region contains blocks, we search for a theme function named theme_region_regionname(). If exists, we run that, else we just return the concatenated blocks for that region.
1 754 posted 16 years ago by berkes
An easy debug trick: gives you a variable that you can print in any tpl.php to find out what vars you have available there.
1 761 posted 16 years ago by berkes
Place the first function, phptemplate_links() in your template.php file. Alternatively (and IMO better) is to name the function your_theme_name_links() where your_theme_name is the name of your theme. From here on, you can add theme functions like...
2 748 posted 16 years ago by berkes
Sets a module's weight to the lowest number. This assures that your module is ran before all other modules. Userfull if you want your implementation of a hook to be ran first. Add this to your .install file. Replace your_modulename with the name of...
2 601 posted 16 years ago by berkes
Add these lines to Drupals settings.php. Probably works on other systems, then Drupal too.
1 775 posted 16 years ago by berkes
Display first article one way and following ones a different way
3 661 posted 16 years ago by JuliaKM
0 437 posted 16 years ago by WimLeers
2 561 posted 16 years ago by WimLeers
1 522 posted 16 years ago by WimLeers
With thanks to joshk :)
4 651 posted 16 years ago by WimLeers
With thanks to emspace for the original code :)
1 574 posted 16 years ago by WimLeers
With thanks to emspace for the original code :)
3 657 posted 16 years ago by WimLeers
Drupal snippet: outputs all theming variables of a content type or page. Add to template.php the following function: function _phptemplate_variables($hook, $vars) { return array('vars_data' => $vars); } then add the snippet to the relativ...
5 699 posted 16 years ago by marcoba
1 460 posted 16 years ago by JuliaKM
Removes the core, and node styles from the $style variable. You most morbably already defined _phptemplate_variables($hook, $vars), in that case just add the two lines there. _sympal_theme.. is the name of the theme where we use this.
3 691 posted 16 years ago by berkes
2 674 posted 16 years ago by JuliaKM
1 603 posted 16 years ago by JuliaKM