The main feature of the module is that it allows you to create all kinds of lists directly from the public area site. Without going to the "admin panel", you will create your directories, lists, registers and the like and fill them with data. Do it - create an interface and customize
the appearance of the lists you will be using convenient visual tools. And, by enabling support in the module settings business processes, you organize and organize teamwork with lists.
![]() | Module features:
|
Enabling business processes
Suppose you have a need to organize receiving web forms website from business partners. At the same time, you, of course, do not want to give access to the administrative part to unauthorized users. The ready-made mechanism of "Universal Lists" just allows the already existing Infoblock with a large amount of accumulated data to be presented in the "public" and give partners the opportunity to search through it, filter information. That is, partners will only work with list data and add entries to them.
The "Universal Lists" module is a practical solution "Grids + Infoblocks". With the help of this solution, you can configure your site to work with a wide variety of lists - with any data, with any source. The Grid technology used in the module successfully allows you to do this - to create FAQ, reference books and knowledge bases, lists of counterparties, structured archives, libraries, file storages and more.
The "Universal lists" module is quite powerful and functional. It can be successfully used to provide site users with the ability to add and edit their infolock elements in the public part. However, the principle of working with it is very different from what we are used to when working, for example, with the "Adding infoblock elements" component. First of all, it concerns the setting of access rights. In this article, I will tell you how to configure the module to perform a task similar to the one that was previously solved using the "Adding infoblock elements" component, i.e. so that the user can add elements of the infoblock, and edit elements, but only those added by him, with the possibility of moderation by the site editor.
1. Create an infoblock type
Because the complex component "Universal lists" (bitrix:lists) does not work with separate infoblocks, we create the "Companies" infoblock type.
2. Set up the infoblock type for working with universal lists
To do this, go to the "Universal lists" module settings (Settings > Product settings > Module settings > Universal lists) and on the "Permissions" tab, allow the "Administrators" group to manage lists in our created "Companies" infoblock type.
This step is required because without it, when placing the component, our infoblock type will not appear in the drop-down list in the component parameters.
3. Place the component
We create a section on the site and place the "Universal lists" component in it.
In the component parameters, select our infoblock type and enable CNC support (in non-CNC mode, I personally could not get the component to work).
Add infoblock (list)
After placing the component, we will see a panel on the page with a single "Add" button. With it, we can add an infoblock.
Click the "Add" button. The form for adding an infoblock will open.
On the "Access" tab, set the "Add" right for the "Registered users" group, and the "Change" right for the "Author" user category. The latter will enable the user to edit their elements. If you set the "Change" right for the "Registered users" group, then the user will be able to edit all elements of the infoblock, and not just his own. Instead of the Registered Users group, you can also use the All Authorized Users category.
Note: the infoblock can also be added through the administrative part of Bitrix, if extended access rights are enabled.
After completing these steps, users of the "Registered users" group will see the following on the main page of the section:
When selecting the information block (list) "Companies", the user will have access to a list of its elements.
When you click the "Add company" button, an editing form will open:
Adding fields
The interface for adding fields is one for the actual fields and infoblock properties. In this case, you can set your own name for any field, as in the "Adding infoblock elements" component.
Sending notifications and approval
Sending notifications to the site administrator and approving documents when working with universal lists is usually carried out using business processes. Because it is not convenient to use standard business processes in this case, you will have to create your own business process. You can also use the "Document Management" module instead of business processes, but you will have to configure the infoblock to work with document management through the administrative part of Bitrix, because. there is no such possibility in the "Universal Lists" component).
To use business processes with a list (infoblock), the checkbox "Enable support for business processes" must be checked in the list settings. Then the "Business Processes" button will appear in the list toolbar for the administrator.
After clicking on the button, we will see a list of business process templates.
Click the "Create Sequential Business Process" button. The Edit Business Process Template page opens.
This is a slightly modified standard "First Vote Approval" business process. Because The standard publishing mechanism could not be used - when unpublishing, the elements are not displayed in the list (even under the admin), I used instead of the "Publication" / "Removing the document from the publication" blocks "Changing the document" with a simple activation / deactivation. Also, instead of email messages, I used social media messages.
In the template parameters, check the "Automatically start when added" checkbox.
If you check the "Automatically start on change" checkbox, the process will be launched by the user when the element changes. Or you can create a separate business process for this, which will function according to a different scenario, for example, not deactivate the element, but simply send a notification to site editors.
Note: keep in mind that if a user group is not set to have at least "Read" access to the list (infoblock), then this group will not appear in the user group selection dialog in the business process designer, and you will not be able, for example, to program the sending of a notification this group.
Editing a Component Template
Editing the component template in our case will be reduced mainly to simplifying and disabling unnecessary functionality.
For example, to change the appearance of the list by default (all columns of fields are displayed by default, the color scheme is blue), add the following code to the lists.list component template in the result_modifier.php file:
$aOptions = CUserOptions :: GetOption("main.interface.grid" , $arResult [ "GRID_ID" ], array()); $aOptions ) ( $aOptions = array ( "views" => array( "default" => array( "name" => "<Представление по умолчанию>" , "columns" => "NAME,BIZPROC" , "sort_by" => "NAME" , "sort_order" => "asc" , "page_size" => "20" , "saved_filter" => "" , ), ), "filters" => array( ), "current_view" => "default" , "filter_rows" => "list_section_id" , "theme" => "grey" , ); CUserOptions :: SetOption("main.interface.grid" , $arResult [ "GRID_ID" ], $aOptions ); |
This code will set the display of only columns "Name", "Business processes", gray color scheme, etc. If the user has already selected columns or something else, his choice will not be changed.
In the same result_modifier.php file, we will remove the link to the business process in the list, leaving only the name. The very name of the column "Business processes" is changed to "Status". Thus, this column will display the status of the business process, for example, we can set the statuses "On moderation", "Published", "Rejected" in the business process itself.
To remove the ability to start a business process from the context menu, paste the code in the same file:
foreach($arResult [ "ELEMENTS_ROWS" ] as $i => $arRow ) ( $arActions = Array(); $arRow [ "actions" ] as $a => $arAction ) if(! $arAction [ "MENU" ]) $arActions = $arAction ; $arResult [ "ELEMENTS_ROWS" ][ $i ][ "actions" ] = $arActions ; |
array("id" => "tab_se" , "name" => $arResult [ "IBLOCK" ][ "SECTION_NAME" ], "icon" => "" , "fields" => $arTabSection ), |
In general, the use of the "Universal lists" module for solving this simple task is not justified and even convenient (it was necessary to perform too many actions, it was necessary to edit the component template). The "Adding infoblock elements" component is much better suited for this, if not for one thing - this component is no longer supported by 1C-Bitrix, and the simplest things have to be finalized almost from scratch. Therefore, in many cases the described method can be advantageous.
I would like to present a functionality that is very important for many developers, which will find (and is already finding) widespread use in 1C-Bitrix products - both in Site Management and in the Corporate Portal. Especially important, given the current trend of the present - that the site now is not just a site, like a company presentation, but more and more like a business application, as a functionality for organizing interaction with partners and customers. We will talk about Universal Lists using Grid technology. We will talk a little about the Grids themselves - only at the "what is it" level. Let's take a closer look at the Universal Lists - about exactly how the "kitchen" of Grids is used in this module, why it greatly simplifies the work of a web developer to create all sorts of lists on sites, and allows the user to work with them easily and conveniently.
A little about Grid
The technical support of "1C-Bitrix" constantly receives questions on the topic: "But what about what is in the" admin panel "and take out" to the street "- to people?" Indeed, how to present in the "public" some functionality, for example, universal grids? And not just to present, but also to give the opportunity to enter data there?
When developing a new product - "Corporate Portal", the developers of "1C-Bitrix" faced the fact that all public interfaces turned out to be scattered. And only because there was no tool for creating the same type of interface. The solution was visual Grids, a set of core components for creating a unified interface. What are these Grids, what do you need to know about them? It is first and foremost a developer tool! This is not a custom component, so there is no point in adding it to the project page through the component tree. This is an API for the developer - in order for him to present his data.
Multifunctional component for displaying lists
You might get the misconception about Grids that they can only display InfoBlocks. This is absolutely not the case - Grids can work with abstract data and display everything that is "slipped" to them. Grids are also loaded with typical functionality for working with lists and forms. That is, what is common, grids facilitate and simplify. And one of the distinguishing features of grids is that they provide quite a wide range of customization options for the user - "for themselves". This means that each of the users can make their own Grid settings, which will be convenient only for him.
Setting up custom views
What does the general pattern of using Grids look like? Since Grids operate in the public section, you will most likely be creating a component for the public section that represents the data, sorts, filters, and so on. To present this data, you call the Grid component, the form component in the template of your component and simply pass data from them to display. And, if necessary, you can use ready-made components, let's say one of the simplest - "toolbar", which is your toolbar and displays with buttons.
Generic Lists
Grid components are implemented in 1C-Bitrix products, in particular, the Document Library in 1C-Bitrix: Corporate Portal uses grid components, the Business Processes Without Documents module uses grids. All this allows you to use a unified interface with the same user settings and functionality. One of these modules, for the sake of which, in fact, the "kitchen" of Grids was started, is the Universal Lists module. What is this module?
List - Government of the Russian Federation
Often there are tasks to maintain data in the public section, and so far there have been no interfaces for this, except, of course, the administrative one. The created module is an add-on for Infoblocks, organized as a public complex component and allows the user to enter his data in the form of a list. The component works with the specified Infoblock type ("Lists" is displayed in the distribution kit), this is set by default in the component's settings. This means that all Infoblocks created in this component will be added to this type.
Component settings - Infoblock type
You can also specify which user groups have the right to work with our universal lists. For example, in the settings for the Administrator, you can specify that he can change and add sections and list items. But in the same way, you can grant this right to other user groups, for example, company employees.
Lists, they are also Infoblocks
What do we see on the site? Essentially a list of infoblocks. That is, adding a new list, for example, "Partners", we add a new Infoblock. In this list-infoblock, we can set up labels, labels for elements and sections of the list. For example, if we are talking about a list of partners, then "Add item" can be renamed to "Add partner". The owner of the list can immediately determine access to his list: some group - reading, some - changing elements. Thus, you can immediately decide and set up the order of collective work with the created lists.
To start working with lists, you need to create a page, create an Infoblock type, place the "Universal Lists" component on the page, select the "Lists" infoblock type in it, and start working.
The plans for the development of Lists in 1C-Bitrix products provide for the following:
Lower control over the lists to the level of the working group in order to work with their own lists within the group;
So that you can create your own, personal list in your profile. So far, in order to "start" the lists on his page, the user must contact the administrator to place the component on his page and configure it, after which you can start working with the lists.
Customizing list fields
What can be configured in the list? We have already talked about signatures and rights. And the most interesting thing is that you can customize the fields in the lists! Moreover, it should be especially noted that this is done in exactly the same way as you did in the administrative section in the Infoblocks. At the same time, you can add both standard fields - such as "Name", "Date of activity", and Infoblock properties, such as Number, Date, File, Binding to Infoblock elements. You can also set default values and use Infoblock sections.
Basic field settings
Let's see how the list is configured. Let's add some field. Let this be the date of the last contact. We add a field, we say that it is Date \ Time, we do not put down the default value - a field has appeared, for example, "Date of the call". Now we edit the list parameters and, accordingly, we have a new field of the "Date" type. As you can see, in this way we can flexibly customize our list, adding the fields that we need, and maintain, say, a register of some documents on the site.
As we have already said, the Lists module uses the standard features of Grids, that is, it supports item sorting, item filtering, item editing form and group editing/deleting.
Lists + Business Processes
Another very interesting feature of Universal Lists is the support of built-in Business Processes. You probably don't have it in the public section yet. To include Business Processes in your lists, you must go to the administrative section in this Infoblock and enable Business Processes for it there.
Business processes in the lists are enabled in the admin panel - in the infoblock properties
Using business processes allows you to organize quite serious things on lists. For example, in the register of incoming documents, the Counter property allows you to automatically number all documents, and you can open a business process that will send the final document to an executor who will somehow respond to this document. In this way, you can organize well-coordinated collective work with lists.
Lists support business processes
List Usage Examples
The Universal Lists module is included in all editions of "1C-Bitrix: Corporate Portal" (www .1c -bitrix .ru /products /intranet /) - it is clear that it is needed there to maintain lists of some internal order, for example, these can be customer contact lists. In "1C-Bitrix: Site Management" (www.1c-bitrix.ru/products/cms/) the module is present in 3 older editions, starting with Business. It is assumed that the lists will be used, for example, to create closed sections for business partners. Partners will then be able to maintain their confidential lists there. That is, we can organize an additional service for some site visitors.
Lists on the website of the state organization
You can give a more specific example - to organize the reception of web forms on the site. In essence, web forms become an input form for an infoblock element. In the administrative part, you maintain various Infoblocks and, of course, do not want to allow different groups of users into the admin panel - only your content editors work there. However, it is necessary to enable, say, the company's partners to process data from these Infoblocks - to search through them, add new records. Moreover, this must be done quickly, moreover, it is in the "public" - without entering, we repeat, the administrative department. This is where the ready-made mechanism of Universal Lists comes to the rescue, just allowing the already existing Infoblock with a large amount of accumulated data to be presented in the "public" and make it possible to search through it, filter information - in general, work with this data.
Once again, Grids are a technology with which you can work with any of your data, with any source. For example, you take data from a MySQL project, organize work on Grids - input and processing of this data. But Lists are already a practical solution for "Grids + Infoblocks". How are they related? The list and the Infoblock are essentially the same - the same data, only available to the organization with them directly from the "public".
So, with the help of Universal Lists, you can quickly create lists such as frequently asked questions on your web project. We emphasize once again - directly from the "public" - without going into the administrative panel! The visual universal list editor will help you quickly create and configure repositories of any type of information. And by using visual components with drag & drop support, you can easily do this. Moreover, you can not only enter data into storages, but also edit them.
Natalia Sergeeva for Softomania
Lists- a convenient tool for storing information with its own structure and fields. In addition, lists can be automatically processed using business processes.
Only an administrator can create lists.
Go to page Lists and press Create new.
In the tab Settings enter the name of the list and its description.
Enter a sort value. The lower it is, the higher the list is among the rest. Add a picture for your list.
If you plan to use business processes in the operation of lists, then activate the option Enable business process support.
Bookmark Signatures you can set your own names for the elements and sections of the list. For example, if you are creating a Suppliers list, then you should replace the word element with a supplier, and the word section with a group of suppliers, and so on.
With button Add select the desired group or specific user for which you want to change access rights and set them.
In order to explore the additional possibilities of business processes, let's analyze the situation when your company receives a commercial offer (CO) from a supplier, partner or any other counterparty.
First of all, we need to understand what to do with this document. To do this, we send it for approval to a competent employee (expert), who will decide on the future fate of the CP: it is either deleted or saved to disk and entered into the registry for further work, or, if the CP is considered useful, a transaction is immediately created and work begins.
To automate this business process, you need to be able to work with lists.
IN There are 2 types of lists:
We start working on the BP by creating two different lists:
The difference between the first list "Coordination of commercial proposals" is that the employee can send a commercial offer to the right expert for approval as quickly as possible. Here you only need to set the required fields, namely: