2014-06-13, 17:35:52
how to get latest 5 or maybe 10 items from all categories ?
how to sort by DESC ? i'm was try a:
ImModel:etPref('gsortby', 'title');
but it's not working
how to sort by add date ex: by time added
i'm was try a sort menu by asc
how to sorted menu by asc / dsc ?
it's possible to add a number of items what have a category ? example:
category one (24 items)
category two (two items)
how to sort by DESC ? i'm was try a:
ImModel:etPref('gsortby', 'title');
but it's not working
how to sort by add date ex: by time added
i'm was try a sort menu by asc
PHP Code:
<?php
$manager = new ImController();
$preferences = imModel::getPref();
// Register your link template
$manager->tplRegister(array(
'loop' => '<a title="Click to go to category..."
href="[[ my_group_url ]]">[[ my_group_title ]]</a><br />'
));
foreach($preferences->categories->category as $cat)
{
// setup items by category
ImCategory::setCategory($cat);
$manager->runModelMethod('gen_register', array('group_url', 'group_title'));
$items = $manager->getModelValue('items_ordered_struct');
// Render your link template
echo $manager->paint('loop', array(
'my_group_url' => $items[0]['group_url'],
'my_group_title' => $items[0]['group_title']
));
}
?>
it's possible to add a number of items what have a category ? example:
category one (24 items)
category two (two items)
user plugin: scroll to top