Blog Date Archive -> Search block, can have dates next to posts?

Permalink
So I made a standalone Archive page for the blog, and from there I made a page that shows the Search block and lists the pages for the month selected from the Archive page.

My question is, for the Search results, how do I show the date of each post next to its listing? Like this...

First Post Title
Sept 1, 2013 <--
Blah blah blah blah blah blah blah ipsum

Second Post Title
Sept 12, 2013 <--
Blah blah blah blah blah blah blah ipsum

Can this even be done? Thanks in advance!!

 
planist1 replied on at Permalink Best Answer Reply
planist1
Modify blocks/search/view.php. Here is what you could do (from line 23):

<?php  
$tt = Loader::helper('text');
if ($do_search) {
   if(count($results)==0){ ?>
      <h4 style="margin-top:32px"><?php echo t('There were no results found. Please try another keyword or phrase.')?></h4>   
   <?php  }else{ ?>
      <div id="searchResults">
      <?php  foreach($results as $r) { 
         $currentPageBody = $this->controller->highlightedExtendedMarkup($r->getBodyContent(), $query);?>
         <div class="searchResult">
            <h3><a href="<?php echo $r->getPath()?>"><?php echo $r->getName()?></a></h3>
            //start add
                <p>
            <?php 
            $datePublic = date('F j, Y', strtotime($page->getCollectionDatePublic()));
mssteph replied on at Permalink Reply
Worked! Thank you!!! :)
planist1 replied on at Permalink Reply
planist1
Glad to help! :)