Skip to content

Instantly share code, notes, and snippets.

@dmolsen
Created December 28, 2010 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmolsen/757677 to your computer and use it in GitHub Desktop.
Save dmolsen/757677 to your computer and use it in GitHub Desktop.
The map module federated template that adds the appropriate HTML to $html to be used in the final template
<?
// a template for web/search/ feature hence why it's totally different than all others
$html .= "<div class='nonfocal'><strong>Campus Map Results</strong></div>";
$html .= "<p class='focal results'>";
if ($total == 0) {
$html .= "No results returned.";
} else {
$i = 0;
if ($total > 3) {
while ($i < 3) {
$place = $results[$i];
ob_start();
include("../map/templates/$prefix/items.html");
$html .= ob_get_contents();
ob_end_clean();
$i++;
}
$more = $total - 3;
$html .= "<a href='/map/search.php?filter=".$filter."'>".$more." more results...</a><br />";
} else {
while ($i < $total) {
$place = $results[$i];
ob_start();
include("../map/templates/$prefix/items.html");
$html .= ob_get_contents();
ob_end_clean();
$i++;
}
}
}
$html .= "</p>";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment