You are here

function contemplate_available_files in Content Templates (Contemplate) 7

Same name and namespace in other branches
  1. 5 contemplate.module \contemplate_available_files()
  2. 6 contemplate.module \contemplate_available_files()

List the available template files

Return value

array of template file information

1 call to contemplate_available_files()
contemplate_get_file in ./contemplate.module
Given a node type and field type, return the content of the most specific file

File

./contemplate.module, line 604
Create templates to customize teaser and body content.

Code

function contemplate_available_files() {
  static $data;
  if (!isset($data)) {
    $conf = conf_path();
    $result = db_query("SELECT data FROM {contemplate_files} WHERE site = :site", array(
      ':site' => $conf,
    ));
    foreach ($result as $record) {
      $data = unserialize($record->data);
    }
  }
  return $data;
}