Skip to content

Commit

Permalink
Create the links correct for the count item feature
Browse files Browse the repository at this point in the history
Closes joomla#82
  • Loading branch information
laoneo committed Apr 26, 2016
1 parent aeac2e9 commit 58feb3f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
$listDirn = $this->escape($this->state->get('list.direction'));
$ordering = ($listOrder == 'a.lft');
$saveOrder = ($listOrder == 'a.lft' && strtolower($listDirn) == 'asc');
$parts = explode('.', $extension);
$parts = explode('.', $extension, 2);
$component = $parts[0];
$section = null;

Expand All @@ -40,6 +40,13 @@
{
$section = $inflector->toPlural($section);
}

// If the section ends with .fields, then the category belongs to com_fields
if (substr($section, -strlen('.fields')) === '.fields')
{
$component = 'com_fields';
$section = 'fields&context=' . str_replace('.fields', '', implode('.', $parts));
}
}

$columns = 7;
Expand Down

0 comments on commit 58feb3f

Please sign in to comment.