Search Forms and Block Config

Any guidelines on how to set up the SOPAC blocks and catalog search form?

That's all going to go into the project specific documentation that i haven't done yet :)

SOPAC blocks should be available to you in /admin/build/block to activate and place as you see fit, is that not the case?

The catalog form can be called from anywhere (and any node) by calling the print sopac_search_form() function. In our case, the catalog page is a view that calls it in the header like so:

print sopac_search_form('both');

'both' in this case meaning both basic and advanced forms.

Yep, the blocks are available, just need to figure out which paths to display on.

Thanks for the search form info. Are you using the views module to display that? (Haven't used the views module yet)

SOPAC doesn't really address block placement, since it assumes you know best where they should go :)

Yes, we're using views very extensively on our site.

BTW, here is a small module function I wrote to manage our blocks. I call it in the block configuration itself using the PHP input filter:

/**
 * Determines whether a block should display.  Examples of arrays to pass:
 * $taxonomies = array(19,20,21,22,23); // list the ids of the taxonomy terms you want
 * $views = array('youth', 'children', 'teens', 'firstfive'); // The views/paths you want
 */
function DL_block_show($taxonomies = array(), $views = array()) {
	$uri_arr = explode('/', $_GET[q]);
	// This will show on all nodes having this term
	if (($uri_arr[0] == 'node') && is_numeric($uri_arr[1])) {
		$terms = taxonomy_node_get_terms(node_load($uri_arr[1]));
		foreach($terms as $term) {
			if (in_array($term->tid, $taxonomies)) return TRUE;
		}
	}
	// This will show on the index page for that term
	if (($uri_arr[0] == 'taxonomy') && ($uri_arr[1] == 'term') && (in_array($uri_arr[2], $taxonomies))) {
		return TRUE;
	}
	// This will show if this view is active
	if (in_array($uri_arr[0], $views)) { return TRUE; }
	// Otherwise
	return FALSE;
}

Nice, I'll have to check that out.

Oh, and I figured out the paths were already in the block configs, but I needed to go in and change them to "Show only on the listed pages".