We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49079
    • 12 Posts
    Hi all! Sorry for my English!!

    I need help. I created news section with rubrics and i use MIGX in rubric page for controls news page. I want use Tagger for chose tags on news page, but i don't understand how i can insert TaggerField in MIGX page model...

    Who can me help?
      • 4172
      • 5,888 Posts
      is it a MIGX-TV or is it MIGXdb?

      Can you post your MIGX - configuration?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 49079
        • 12 Posts
        It's MIGXdb!

        Yes sure, i can.

        <?php
        
        $this->customconfigs['packageName'] = 'publics';
        $this->customconfigs['task'] = 'publics';
        
        $this->customconfigs['formcaption'] = 'Публикация';
        $this->customconfigs['migx_add'] = 'Добавить публикацию';
        $this->customconfigs['update_win_title'] = 'Публикация';
        $this->customconfigs['classname'] = 'modResource';
        $this->customconfigs['getlistsort'] = 'id';
        $this->customconfigs['getlistsortdir'] = 'desc';
        $this->customconfigs['gridpagesize'] = '100';
        $this->customconfigs['gridload_mode'] = '2';
        $this->customconfigs['check_resid'] = '2';
        
        $this->customconfigs['includeTVs'] = 'img,tags';
        $this->customconfigs['tabs'] = [];
        $this->customconfigs['tabs'][] =
            [
                'caption' => 'Документ',
                'fields' => [[
                    'field' => 'pagetitle',
                    'caption' => 'Заголовок'
                ], [
                    'field' => 'deletedon',
                    'caption' => 'Дата публикации',
                    'inputTVtype' => 'date'
                ], [
                    'field' => 'img',
                    'caption' => 'Изображение в списке',
                    'inputTV' => 'img'
                ], [
                    'field' => 'longtitle',
                    'caption' => 'Расширенный заголовок'
                ], [
                    'field' => 'description',
                    'caption' => 'Описание',
                    'inputTVtype' => 'textarea'
                ], [
                    'field' => 'introtext',
                    'caption' => 'Аннотация',
                    'inputTVtype' => 'textarea'
                ], [
                    'field' => 'tags',
                    'caption' => 'Список тегов',
                    'inputTV' => 'tags'
                ], [
                    'field' => 'content',
                    'caption' => 'Контент',
                    'inputTVtype' => 'richtext'
                ], [
                    'field' => 'cacheable',
                    'caption' => '',
                    'inputTVtype' => 'hidden',
                    'default' => '0'
                ], [
                    'field' => 'hidemenu',
                    'caption' => '',
                    'inputTVtype' => 'hidden',
                    'default' => '1'
                ], [
                    'field' => 'isfolder',
                    'caption' => '',
                    'inputTVtype' => 'hidden',
                    'default' => '1'
                ], [
                    'field' => 'published',
                    'caption' => '',
                    'inputTVtype' => 'hidden',
                    'default' => '0'
                ], [
                    'field' => 'show_in_tree',
                    'caption' => '',
                    'inputTVtype' => 'hidden',
                    'default' => '0'
                ], [
                    'field' => 'template',
                    'caption' => '',
                    'inputTVtype' => 'hidden',
                    'default' => '4'
                ]]
            ];
        
        $this->customconfigs['filters'] = [];
        $this->customconfigs['filters'][] = [ // Фильтрация по коду
            'name' => 'search',
            'label' => 'Поиск',
            'emptytext' => 'Поиск по заголовку',
            'type' => 'textbox',
            'getlistwhere' => '{"pagetitle:LIKE":"%[[+search]]%"}',
        ];
        
        $gridcontextmenus['update']['active'] = 1;
        $gridcontextmenus['publish']['active'] = 1;
        $gridcontextmenus['unpublish']['active'] = 1;
        $gridcontextmenus['remove']['active'] = 1;
        
        $gridactionbuttons['addItem']['active'] = 1;
        $gridactionbuttons['bulk']['active'] = 1;
        
        $columns = '[{
              "header": "ID"
            , "width": "20"
            , "dataIndex": "id"
            , "sortable": "false"
            },{
              "header": "Заголовок"
            , "width": "300"
            , "dataIndex": "pagetitle"
            , "sortable": "false"
            },{
              "header": "Аннотация"
            , "width": "300"
            , "dataIndex": "introtext"
            , "sortable": "false"
            },{
              "header": "Дата"
            , "width": "80"
            , "dataIndex": "deletedon"
            , "hidden": "true"
            , "hideable": "false"
            , "renderer": "this.renderDate"
            },{
              "header": "Пуб.."
            , "width": "40"
            , "dataIndex": "published"
            , "hidden": "true"
            , "hideable": "false"
            , "renderer": "this.renderClickCrossTick"
        }]';
        
        $this->customconfigs['columns'] = $this->modx->fromJson($columns);
        	
        
          • 49079
          • 12 Posts
          I found good solution! I used the extension SmartTag. It have ability create TV type SmartTag and i can use TV in migx configuration. It's works, i checked.

          But i had problem. TV didn't work in MIGX window. The Developer didn't test extension in MIGX, and before use need fix one line in template

          File ~/core/components/smarttag/elements/tv/mgr/input/tpl/smarttag.tpl line 12

          ,tvId: {/literal}{$tv->id}{literal} /* replace to --> */ ,tvId: '{/literal}{$tv->id}{literal}'