I ask this question once per year, as every year it gives me great grief
I have two views, same table, each will have different limits and default ordering.. here is what I have so far
public function populateState($ordering = null, $direction = null)
{
// Initialise variables.
$app = JFactory::getApplication();
$session = JFactory::getSession();
$acl = MyComponentHelper::getActions();
parent::populateState('a.film_title', 'asc');
$this->setState('list.limit', 15);
if($this->context == "films.latestfilms")
{
parent::populateState('a.creation_date', 'desc');
$this->setState('list.limit', 10);
}
}
The overall state works (film title, 15)
but the contextual one (lates films) doesnt
How can I correctly code this populate state to work
Thanks