How do you add a button on a panel on the list of infoblock elements?



  • The essence of the task is to add a cap on the panel which is on the list of infoblock elements. I wrote the button functionality, and how to put it in the panels (with the rest of the control buttons) unclear. I tried adding a button in the text. result_modifier.phpbut she doesn't show up.

    What's the best here?

    PS. This is a standard component and a similar task has been achieved for the Adminki. Here's the example of this panel:

    Панель списка элементов инфоблока

    Initially, to get the button off, decided to change the template of the standard component a little bit. components/bitrix/lists.listThe documentation says that to change the data transferred in the set of parameters, it is possible to use result_modifier.php♪ In it, I tried to add the button of the next species. template.php😞

    $arToolbar[] = array(
        "TEXT" => GetMessage("Выгрузить в Excel с шаблоном"),
        "TITLE" => GetMessage("CT_BLL_EXPORT_EXCEL_TITLE"),
        "LINK" => "/local/modules/sg.xlreport/lib/export_excel.php?id={$id}", //путь к скрипту выгрузки в excel
        "ICON" => "btn",
    );
    

    The button didn't appear on the panel, so questions arose, and is it correct in this case to work with the standard component? Maybe I've started the wrong thing, and it's easier to do.



  • Files modified result_modifier.php and template.php The component ' s own (coded) template will be maintained after the product is updated.

    In the file. result_modifier.php You're just preparing what's going to be transferred to the file. template.php♪ So you're supposed to be in the file. template.php paint the same button for which result_modifier.php They wrote the necessary parameters.

    The file itself. result_modifier.php I'm not in charge of entering the box. template.php

    Accordingly, you must add the required button to the right place in the file. template.php


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2