Skip to content

Commit 498f6af

Browse files
committed
Add filter featured to content admin menuitem articles
1 parent 789ba79 commit 498f6af

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

administrator/components/com_content/src/Model/ArticlesModel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ protected function populateState($ordering = 'a.id', $direction = 'desc')
142142
// Required content filters for the administrator menu
143143
$this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id');
144144
$this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level');
145+
$this->getUserStateFromRequest($this->context . '.filter.featured', 'filter_featured');
145146
$this->getUserStateFromRequest($this->context . '.filter.author_id', 'filter_author_id');
146147
$this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', '');
147148
$this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access');

administrator/components/com_content/tmpl/articles/default.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@
2424
filter="integer"
2525
/>
2626

27+
<field
28+
name="filter_featured"
29+
type="list"
30+
label="JFEATURED"
31+
filtermode="selector"
32+
class="js-select-submit-on-change"
33+
validate="options"
34+
>
35+
<option value="">COM_CONTENT_SELECT_FEATURED</option>
36+
<option value="0">COM_CONTENT_FILTER_FEATURED_NO</option>
37+
<option value="1">COM_CONTENT_FILTER_FEATURED_YES</option>
38+
</field>
39+
2740
<field
2841
name="filter_level"
2942
type="integer"

0 commit comments

Comments
 (0)