Hi,
I'd like to display one or more recent exhibits on my homepage. I've adapted from the exhibit_builder_random_featured_exhibit()
function to come up with the following, but it's throwing Zend errors when I try to grab the links:
//Returns Recent Exhibit for display on homepage
function deco_exhibit_builder_display_recent_exhibit($num=1)
{
if (function_exists('exhibit_builder_link_to_exhibit'))
{
$html = '<div id="recent-exhibit">';
$recentExhibit = get_db()->getTable('Exhibit')->findBy(array('recent'=>true), $num);
$html .= '<h2>Recent Exhibits</h2>';
if ($recentExhibit)
{
$html .= '<h3>' . exhibit_builder_link_to_exhibit($recentExhibit) . '</h3>';
$html .= '<p>' . snippet($recentExhibit->description, 0, 500,exhibit_builder_link_to_exhibit($recentExhibit, '<br/>...more')) . '</p>';
}
else
{
$html .= '<p>You have no recent exhibits.</p>';
}
$html .= '</div>';
return $html;
} }
This is the error message:
Warning: urlencode() expects parameter 1 to be string, array given in /home/content/30/4717730/html/omeka-dev/application/libraries/Zend/Controller/Router/Route.php on line 399
Once again, I've cross-posted to the Dev group, but figured I would add it here too in case other users are looking to do something similar. To view/respond, see:
https://groups.google.com/d/topic/omeka-dev/P75f351W4FQ/discussion