The museum I was working for had a web site based on Joomla. As more items were added to Omeka they wanted to integrate some of the Omeka data into the web site. The data to be presented in Joomla was all of one item type. Joomla, through a plugin, is able to run custom PHP code and this custom code was used, via the Omeka API, to access and format the Omeka data. 

To start we need to set-up the API using the Omeka Admin screen. The the code to be run in Joomla is:

$uri='http://yourwebsite/api/items?item_type=3';
$key ='1234..........xyz';
include ('httpful.phar');

This has defined the Omeka uri and key plus pulled in an HTTP library. The uri has been configured to access all items with a type of 3. Now go get some data:

$response = \Httpful\Request::get($uri . '&key=' . $key)
    ->send();
$response_decoded = json_decode($response,true);
$record = array();
$length_response = count($response_decoded);

Now loop around processing the Omeka item data ready to display in Joomla:

 



for ($j = 3; $j < $length_response; $j++ ) {
	
	$item_data = ($response_decoded[$j]);
	$file_count = $item_data['files']['count'];
	$length_item = count($item_data['element_texts']);
	for ($i = 0; $i < $length_item; $i++) {
	$elementName = $item_data['element_texts'][$i]['element']['name'];
	$record [$elementName] = $record [$elementName] . $item_data['element_texts'][$i]['text']  ;

	}
echo   "<h3>" . $record["Title"] . "</h3>  <p>" .  $record[	"Description"] .  ' (' . $record["Identifier"] .')';
}

 Now you should get back a list items showing the titles, descriptions and ids

 For more information or help use the contact form