 readme content template contemplate module for drupal by jeff robbins lullabot wwwlullabotcom what is the difference between contemplate and theming in drupal the presentational layer the theme is a walledoff and separate entity since it is possible for users to choose their own themes or to switch themes programmatically drupal does not make any assumptions about presentation in the way that it thinks about content this can become a problem when modules like cck are adding fields that you may want to show up in specific ways drupal s rss feeds and search indexing does not run through the theme layer this is as it should be because neither of these use presentational information however there are certainly times when you want to rearrange this content remove parts of it or display things in special ways you can affect most of the site display using your theme s node templates but if you would like to affect the content across multiple themes multiple sites or simply affect the rss feed and search indexing you ll want to use contemplate contemplate alters the way that drupal thinks of the content it alters the node teaser and or body fields before the theme is invoked so it will affect rss feed and search index in addition to the content variable that gets sent to your theme s node templates what does contemplate do this module allows modification of drupal s teaser body and rss feed using administrator defined templates these templates use php code in a manner very similar to the phptemplate theme engine and all of the node object variables are available for use in each template an example node object is displayed and it is as simple as clicking on its properties to add them to the current template this module was written to solve a need with the content construction kit cck where it had a tendency toward outputting content in a notverypretty way and as such it dovetails nicely with cck adding a template tab to cck contenttype editing pages and prepopulating the templates with cck s default layout this makes it easy to rearrange fields output different fields for teaser and body remove the field title headers output fields wrapped for use with tabsmodule part of jstools or anything you need diskbased templates it is also possible to create diskbased template files to do this copy the contents of a contemplate textarea and paste it into a file called node nodetype field tplphp where nodetype is the content type and field is either body teaser or rss it is also possible to create a template called node nodetype tplphp which will affect all cases and nodetplphp which will affect all node types place these files into a directory called contemplates inside of either your sites all directory or sites yoursite depending on your setup it is also possible to have multiple contemplate directories with sites all contemplates being the fallback for templates the contemplate does not find in the more specific site directory when adding or removing template files you will need to visit the content templates admin page to refresh the template list cache you do not need to do this again when making changes to the content of the templates 