fetchPrintEntries parameter error
Posted: Mon Feb 21, 2011 9:43 am
Hi,
I am still working on a template, it´s nearly finished but I have a problem
config.inc
this fetch will work
index.tpl
and this fetch will NOT work:
( want to replace limit="0,2" with limit="0,$twocolcat.anzahl"
I suspect a syntax error
Any idea ?
Thanks
I am still working on a template, it´s nearly finished but I have a problem
config.inc
Code: Select all
$twocolcats= array();
for ($i = 0; $i < $template_loaded_config['two_col_cats']; $i++) {
$twocolcats[] = array(
'anzahl' => $template_loaded_config['twocolcat' . $i . 'text'],
'cat' => $template_loaded_config['twocolcat' . $i . 'cat'],
'kat' => $template_loaded_config['twocolcat' . $i . 'cat']
);
$template_config[] = array(
'var' => 'twocolcat' . $i . 'twocolcat_info',
'type' => 'content',
'default' => '<b><p style="color:#FFFFFF; background-color: orange">'. TWOCOLCAT_TITLE . ' #' . $i .'</p></b>' ,
);
$template_config[] = array(
'var' => 'twocolcat' . $i . 'text',
'name' => TWO_COL_ENTRIES . ' #' . $i,
'type' => 'string',
'default' => '2'
);
$template_config[] = array(
'var' => 'twocolcat' . $i . 'cat',
'name' => TWO_COL_CAT . ' #' . $i,
'type' => 'select',
'default' => '#',
'select_values' => $catsel,
);
}
$serendipity['smarty']->assign_by_ref('twocolcats', $twocolcats);
this fetch will work
index.tpl
Code: Select all
{foreach from=$twocolcats item="twocolcat" name=catlist}
{serendipity_fetchPrintEntries category= $twocolcat.cat full=true fetchDrafts=false noSticky=true limit="0,2" template="entries_2Cols.tpl"}
{/foreach}
( want to replace limit="0,2" with limit="0,$twocolcat.anzahl"
Code: Select all
{foreach from=$twocolcats item="twocolcat" name=catlist}
{serendipity_fetchPrintEntries category= $twocolcat.cat full=true fetchDrafts=false noSticky=true limit="0,$twocolcat.anzahl" template="entries_2Cols.tpl"}
{/foreach}
I suspect a syntax error
Any idea ?
Thanks