Views: 2911 (Data available since 06.02.2017)
When working with a composite component, one or more simple components may be modified, leaving the remaining simple components unchanged.
For example, if you want to increase the length of a group description to be displayed from 50 to 100 characters in the component socialnetwork.user_groups, which forms part of the composite component socialnetwork_group and displays a list of groups, then perform the following.
- Copy the template of the composite component.
Now, the template of the composite component is located in the website template. If we go there, we will see lots of files in the folder
Each file is invoked on a specific page of the social network and connects the simple components that are required.
Now, the file that connects this component must be found and changed. In this case, the file is index.php.
The rest of the files in the template of the composite component located in the website template can be deleted. The composite component will connect these files from the core. This means that they will be updated.
- Now in the remaining file, we replace
- Copy the folder
- In the file
"GROUP_DESCRIPTION" => SubStr($arGroups["GROUP_DESCRIPTION"], 0, 50)."...",
"GROUP_DESCRIPTION" => SubStr($arGroups["GROUP_DESCRIPTION"], 0, 100)."...",
Now, all of the functional capacity of the social network remains standard, except for the component socialnetwork.user_groups.