Jump to content

Gideon So

Members
  • Posts

    470
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Gideon So

  1. Hi @biber

    I don't think the sort() function is available to pageimages because pageimages is not WireArray.

    The result of the below line returns nothing.

    $images = $page->images->sort("iname_".$order, SORT_NATURAL |SORT_FLAG_CASE);

    Then

    foreach($images as $image) 

    Give error because the variable $images is empty.

    Gideon

     

     

    • Like 1
  2. Hi @JerryDi,

    Try the follow code:

    <table border=1> 
    <thead>   
    <tr> 
    	<th>Opponents</th> 
            <th>Venue</th> 
    	<th>Points for</th> 
    	<th>Points against</th> 
            <th>Result</th> 
     
    </tr>
    </thead>
    
    <tbody>
    
    
    <?php $countymatch = $pages->find("template=county-match-result, year={$page->title} "); foreach($countymatch as $match):  ?>
     
    <tr>
    <td><?php echo "<a href='$match->url'> {$match->title}</a>"; ?></td> 
    
    <td>
    <?php if ($match->home_away->title == 'Home'){
     //echo $match->home_match_venue->title("<a href='{url}'>{title}</a>");
    // I don't really understand this line, so I comment it and see if you get more results
    } else{
    echo $match->away_match_venue;
    }; ?>
    </td>
     
                <td><?php echo $match->cheshire_points; ?></td> 
    	    <td><?php echo $match->opponent_points; ?></td> 
                <td><?php echo $match->match_result->title; ?></td> 
     </tr>
      <?php endforeach; ?>
      </tbody>
    </table> 

    Gideon

×
×
  • Create New...