public function createFilteringInterface()
    {
        //Check if section has filtering enabled
        $context = $this->getContext();
        $handle = $context['section_handle'];
        $section_id = SectionManager::fetchIDFromHandle($handle);
        $section = SectionManager::fetch($section_id);
        $filter = $section->get('filter');
        $count = EntryManager::fetchCount($section_id);

        if ($filter !== 'no' && $count > 1) {
            $drawer = Widget::Drawer('filtering-' . $section_id, __('Filter Entries'), $this->createFilteringDrawer($section));
            $drawer->addClass('drawer-filtering');
            $this->insertDrawer($drawer);
        }
    }
public function createFilteringInterface()
    {
        //Check if section has filtering enabled
        $context = $this->getContext();
        $handle = $context['section_handle'];
        $section_id = SectionManager::fetchIDFromHandle($handle);
        $section = SectionManager::fetch($section_id);
        $filter = $section->get('filter');
        $count = EntryManager::fetchCount($section_id);

        if ($filter !== 'no' && $count > 1) {
            $drawer = Widget::Drawer('filtering-' . $section_id, __('Filter Entries'), $this->createFilteringDrawer($section));
            $drawer->addClass('drawer-filtering');
            $this->insertDrawer($drawer);
        }
    }
public function createFilteringInterface ( ) { //Check if section has filtering enabled $ context = $ this -> getContext ( ) ; $ handle = $ context [ 'section_handle' ] ; $ section_id = SectionManager :: fetchIDFromHandle ( $ handle ) ; $ section = SectionManager :: fetch ( $ section_id ) ; $ filter = $ section -> get ( 'filter' ) ; $ count = EntryManager :: fetchCount ( $ section_id ) ; if ( $ filter !== 'no' && $ count > 1 ) { $ drawer = Widget :: Drawer ( 'filtering-' . $ section_id , __ ( 'Filter Entries' ) , $ this -> createFilteringDrawer ( $ section ) ) ; $ drawer -> addClass ( 'drawer-filtering' ) ; $ this -> insertDrawer ( $ drawer ) ; } }
Append filtering interface
Append filtering interface