PHP文件中的代码(来自CLASS的功能):
static function home() {
$featured=new Axon('boats');
$F3::set('boatlist',$featured->afind('D_CustomerID=173'));
F3::set('content',TEMPLATE_DIR .'/home.html');
echo Template::serve(TEMPLATE_DIR .'/layout.html');
}
TEMPLATE home.html:
<div class="span8">
<h3>
Featured Boats
</h3>
<F3:repeat group="{{@boatlist}}" value="{{@boat}}">
<div style="margin-left: 2em" class="thumbnails">
<p>
<a href="boat/{{@boat['D_BoatNum']}}">{{(trim(@boat['D_Description']))}}</a> by {{@boat['D_CustomerID']}}
</p>
<p>
{{@boat['D_Price']}}
</p>
</div>
</F3:repeat>
</div>
此行产生的行数与DB中正确的行数一致。但是,每个字段的实际数据都不会显示。