Created
February 22, 2012 01:56
-
-
Save imperialwicket/1880603 to your computer and use it in GitHub Desktop.
Joomla 1.7 custom search results
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @version $Id: default_results.php 21321 2011-05-11 01:05:59Z dextercowley $ | |
* @package Joomla.Site | |
* @subpackage com_search | |
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
// no direct access | |
defined('_JEXEC') or die; | |
?> | |
<h3>imperialWicket's custom search results</h3> | |
<dl class="search-results<?php echo $this->pageclass_sfx; ?>"> | |
<?php foreach($this->results as $result) : ?> | |
<?php if (isset($result->catid)) : ?> | |
<dt class="result-title"> | |
<?php echo $this->pagination->limitstart + $result->count.'. ';?> | |
<?php if ($result->href) :?> | |
<a href="<?php echo JRoute::_($result->href); ?>"<?php if ($result->browsernav == 1) :?> target="_blank"<?php endif;?>> | |
<?php echo $this->escape($result->title);?> | |
</a> | |
<?php else:?> | |
<?php echo $this->escape($result->title);?> | |
<?php endif; ?> | |
</dt> | |
<dd class="result-text"> | |
imperialWicket loves these results! | |
</dd> | |
<?php else:?> | |
<dt class="result-title"> | |
<?php echo $this->pagination->limitstart + $result->count.'. ';?> | |
<?php if ($result->href) :?> | |
<a href="<?php echo JRoute::_($result->href); ?>"<?php if ($result->browsernav == 1) :?> target="_blank"<?php endif;?>> | |
<?php echo $this->escape($result->title);?> | |
</a> | |
<?php else:?> | |
<?php echo $this->escape($result->title);?> | |
<?php endif; ?> | |
</dt> | |
<?php if ($result->section) : ?> | |
<dd class="result-category"> | |
<span class="small<?php echo $this->pageclass_sfx; ?>"> | |
(<?php echo $this->escape($result->section); ?>) | |
</span> | |
</dd> | |
<?php endif; ?> | |
<dd class="result-text"> | |
<?php echo $result->text; ?> | |
</dd> | |
<?php if ($this->params->get('show_date') && isset($result->created) && $result->created!='') : ?> | |
<dd class="result-created<?php echo $this->pageclass_sfx; ?>"> | |
<?php echo JText::sprintf('JGLOBAL_CREATED_DATE_ON', $result->created); ?> | |
</dd> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php endforeach; ?> | |
</dl> | |
<div class="pagination"> | |
<?php echo $this->pagination->getPagesLinks(); ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment