Currently variables are being created/manipulated in the tpl.php files. example snippet:

$url_prefix = variable_get('sopac_url_prefix', 'cat/seek');
$new_author_str = sopac_author_format($item['author'], $item['addl_author']);
$dl_mat_codes = in_array($item['mat_code'], $locum->csv_parser($locum_config['format_special']['download']));

In the end there's more php than html in these files (which is unwieldy), and in order to change one variable's output, one has to override the tpl.php rather than being able to implement hook_preprocess_sopac_record() for example.

Comments

Sid_M’s picture

We are trying to bring sopac into line with drupal standards, but it's taking a while to do. I completely agree that there's a lot going on in tpl files which should be happening in preprocess functions, and that this is one of the things which needs to be fixed as part of drupalizing sopac. If you're up for taking on this task, for one, some or even all problematic tpl files, we could use the help. If you are going to do so, please be sure to grab the latest version of sopac trunk from the svn repository. Also, if you're not on the sopac dev group mailing list, and want to be, please send John a request.