Ejemplo n.º 1
0
        }
    }
} catch (Exception $e) {
    print '<p><strong>Caught exception: ' . $e->getMessage() . '</strong></p>';
}
?>

	<h2>Demo four</h2>
	<p>Search for packages containing &#8220;gis&#8221; using the alias functions and the search output helper: <code>$ckan->search_display($data, array('search_term' => $search_term, 'title_tag' => 'h3', 'result_list_tag' => 'ol', 'show_notes' => TRUE, 'format_notes' => '&lt;a&gt;'</code>.</p>

	<?php 
try {
    // Search for packages containing "gis" using the alias functions
    // and search output helper
    $search_term = 'gis';
    // search() is an alias for search_package()
    $data = $ckan->search($search_term);
    // search_display takes the result of search() or seach_package()
    // and an optional parameters array
    $ckan->search_display($data, array('search_term' => $search_term, 'title_tag' => 'h3', 'result_list_tag' => 'ol', 'show_notes' => TRUE, 'format_notes' => '<a>'));
} catch (Exception $e) {
    print '<p><strong>Caught exception: ' . $e->getMessage() . '</strong></p>';
}
unset($ckan);
?>

	<p>&#8226; <a href="./">Return to Ckan_client demos</a></p>

</body>

</html>