# Modify Loader Code to Load Group Entities

**URL:** <https://community.shotgridsoftware.com/t/modify-loader-code-to-load-group-entities/19332>\
**Category:** Pipeline Integrations\
**Created:** [October 16, 2024, 5:06pm UTC](https://community.shotgridsoftware.com/t/modify-loader-code-to-load-group-entities/19332 "2024-10-16T17:06:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sophiapreymaker](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sophiapreymaker](https://community.shotgridsoftware.com/u/sophiapreymaker)\
**Post date:** [October 16, 2024, 5:06pm UTC](https://community.shotgridsoftware.com/t/modify-loader-code-to-load-group-entities/19332/1 "2024-10-16T17:06:23Z")

</div>

Hello,

I’ve created a custom Group Entity that contains a field, sg\_published\_files, which is a list of linked Published Files. I’d like to modify the loader code to look for my custom group entity as well as for published files, but I’m having a hard time identifying where within the code I’d be able to adjust what the Loader queries for. Is there already an existing implementation of this somewhere I could reference?

---

<div class="post-metadata">

**Author:** ![Ricardo\_Musch](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/ricardo_musch/32/405_2.png) [@Ricardo\_Musch](https://community.shotgridsoftware.com/u/Ricardo_Musch)\
**Post date:** [October 21, 2024, 3:03pm UTC](https://community.shotgridsoftware.com/t/modify-loader-code-to-load-group-entities/19332/2 "2024-10-21T15:03:32Z")

</div>

Are you modifying the app itself?

You are better of using a hook and the yaml files to configure an extra tab that shows your desired files.  
Usually you dont have to modify the app code itself.

---

<div class="post-metadata">

**Author:** ![sophiapreymaker](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@sophiapreymaker](https://community.shotgridsoftware.com/u/sophiapreymaker)\
**Post date:** [October 22, 2024, 7:39pm UTC](https://community.shotgridsoftware.com/t/modify-loader-code-to-load-group-entities/19332/3 "2024-10-22T19:39:19Z")

</div>

The hope was to be able to modify the app itself, but it might be too much of a hassle

---

<div class="post-metadata">

**Author:** ![Ricardo\_Musch](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/ricardo_musch/32/405_2.png) [@Ricardo\_Musch](https://community.shotgridsoftware.com/u/Ricardo_Musch)\
**Post date:** [October 23, 2024, 12:55am UTC](https://community.shotgridsoftware.com/t/modify-loader-code-to-load-group-entities/19332/4 "2024-10-23T00:55:55Z")

</div>

Why would you want to modify the app instead of using the hooks (which are designed for most customisation).

---

<div class="post-metadata">

**Author:** ![Dashielb](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@Dashielb](https://community.shotgridsoftware.com/u/Dashielb)\
**Post date:** [October 23, 2024, 9:38pm UTC](https://community.shotgridsoftware.com/t/modify-loader-code-to-load-group-entities/19332/5 "2024-10-23T21:38:12Z")

</div>

Hi Sophia,

It should be easy enough for you to modify the loader via a config file, in the default “advanced” config it would be this file here:  
[{config}/env/includes/settings/tk-multi-loader2.yml](https://github.com/shotgunsoftware/tk-config-default2/blob/master/env/includes/settings/tk-multi-loader2.yml)

The way the tabs are structured is very flexible depending on how you configure them. The key for you might be to add or modify the `entities` section to include a new Tab for Groups, or to place the group field in the `hierarchy` of another tab.

Here is an example of something I just configured while working on our Photoshop Integration:

By comparing this and the different things in the config file, you might be able to figure out how to achieve what you’re asking about.

```auto
settings.tk-multi-loader2.photoshop.asset:
  action_mappings:
    Rendered Image: [add_as_a_layer]
    Image: [add_as_a_layer]
    Texture: [add_as_a_layer]
  entities:
  - caption: Current Asset
    entity_type: Version
    filters:
    - [project, is, '{context.project}']
    - [entity, is, '{context.entity}']
    - [sg_status_list, is, apr]
    - [published_files, is_not, null]
    hierarchy: [sg_task, code]
  - caption: Parent Asset
    entity_type: Version
    filters:
      - [project, is, '{context.project}']
      - [entity.Asset.assets, is, '{context.entity}']
      - [sg_status_list, is, apr]
      - [published_files, is_not, null]
    hierarchy: [sg_task.Task.step]
  - caption: All Assets
    entity_type: Version
    filters:
    - [project, is, '{context.project}']
    - [entity, type_is, Asset]
    - [entity.Asset.sg_status_list, is_not, omt]
    - [sg_status_list, is, apr]
    - [published_files, is_not, null]
    hierarchy: [entity.Asset.sg_asset_type, entity, sg_task.Task.step]

```

 ![Screen Shot 2024-10-23 at 2.36.28 PM](https://global.discourse-cdn.com/shotgunsoftware/original/2X/3/3c447b7df407ea69f1f42fea640c3781cf517032.png)
