Jump to content


Photo
- - - - -

Услвовие: категория ИЛИ фильтр


Best Answer fiction13 , 18 January 2017 - 19:57

(drunk)  (drunk)  (drunk)

$this->app->jbrequest->is('task', 'filter');
Go to the full post


  • This topic is locked This topic is locked
1 reply to this topic

#1 CB9TOIIIA

CB9TOIIIA
  • Administrators
  • User rate: 230.6
  • posts: 3680
  • topics: 235

Posted 18 January 2017 - 17:22

Как можно сделать 

if ($this->app->jbrequest->getSystem('category') || $this->is('task', 'filter')) { ?>

Код в реквесте:

public function getSystem($type, $default = null)
    {
        $menuParam = $requestVar = null;
        if ($type == 'item') {
            $requestVar = 'item_id';
            $menuParam  = 'item_id';

        } else if ($type == 'category') {

            if ($this->is('task', 'filter')) {
                $elements = $this->getElements();
                if (isset($elements['_itemcategory'])) {
                    if (is_array($elements['_itemcategory'])) {
                        reset($elements['_itemcategory']);
                        return (int)current($elements['_itemcategory']);
                    } else {
                        return (int)$elements['_itemcategory'];
                    }
                }
            }

Пробовал - не получилось:

if ($this->app->jbrequest->getSystem('category') || $this->app->jbrequest->getTask('filter')) { ?>

  • 0

#2 fiction13

fiction13
  • JBZoo User (rus)
  • User rate: 272.5
  • posts: 604
  • topics: 23

Posted 18 January 2017 - 19:57   Best Answer

(drunk)  (drunk)  (drunk)

$this->app->jbrequest->is('task', 'filter');

  • 2




Click to return to top of page in style!