# CASE: Code parts

**URL:** <https://community.silverfin.com/t/case-code-parts/1269>\
**Category:** Cases\
**Created:** [November 7, 2018, 9:12am UTC](https://community.silverfin.com/t/case-code-parts/1269 "2018-11-07T09:12:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamVanEenoo](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/samvaneenoo/32/134_2.png) [@SamVanEenoo](https://community.silverfin.com/u/SamVanEenoo)\
**Post date:** [November 7, 2018, 9:12am UTC](https://community.silverfin.com/t/case-code-parts/1269/1 "2018-11-07T09:12:36Z")

</div>

Reconciliation templates have a main part and 5 additional parts that can be used for coding.

 ![02](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/1X/ea7388917e8417d37158d94ff5bb820f9e5923a9.png)

## Including additional parts

The main part is always loaded first and the additional parts can be accessed by using the following code in the main part:

```auto
{% include 'parts/name_of_a_part' %}

```

Variables that have been assigned in the main part will be available in the additional parts and visa versa.

---

<div class="post-metadata">

**Author:** ![robin.bailleul](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/robin.bailleul/32/163_2.png) [@robin.bailleul](https://community.silverfin.com/u/robin.bailleul)\
**Post date:** [April 26, 2019, 2:21pm UTC](https://community.silverfin.com/t/case-code-parts/1269/2 "2019-04-26T14:21:38Z")

</div>

Having ‘global’ parts would be a great addition to this:  
code snippets that are configured once on the ‘office level’ and can be reused in all templates.  
This would greatly improve the application of the DRY-principle in Silverfin (Don’t Repeat Yourself).  
Translations, for example, could be defined once and applied in multiple places, instead of the current way of having to define (and maintain) each translation multiple times, i.e. in each template it is used in.  
We have other use cases for these hypothetical ‘global parts’, where we currently have duplicated Liquid-code in multiple templates…  
Just a suggestion 🙂

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [April 26, 2019, 2:25pm UTC](https://community.silverfin.com/t/case-code-parts/1269/3 "2019-04-26T14:25:52Z")

</div>

Hey @robin.bailleul,

Yes, we know, as it is already listed on our list of feature requests 🙂

If this would to happen, we will share it definitely here of course! 👍

Thanks for the suggestion Robin, appreciate it

---

<div class="post-metadata">

**Author:** ![Wsteppe](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/wsteppe/32/1350_2.png) [@Wsteppe](https://community.silverfin.com/u/Wsteppe)\
**Post date:** [April 16, 2020, 3:36pm UTC](https://community.silverfin.com/t/case-code-parts/1269/4 "2020-04-16T15:36:59Z")

</div>

Would be awesome if we had the possiblity to pass parameters to these parts / components as well.

Basic example, this text:

```
{% ic %}
        {::infotext}
            bla bla something
        {:/infotext}
        br
{% endic %}

```

Would be replaceable by something like

`{% infobox %}bla bla something{% endinfobox %}`

or even better:

```
{% infobox
   text:'bla bla something'
   color:'blue'
   accountsInScope:some_accounts %}
{% endinfobox %}

```

Obviously, examples can be much more complex than this 🙂

---

<div class="post-metadata">

**Author:** ![Michiel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michiel/32/2364_2.png) [@Michiel](https://community.silverfin.com/u/Michiel)\
**Post date:** [April 17, 2020, 8:01am UTC](https://community.silverfin.com/t/case-code-parts/1269/5 "2020-04-17T08:01:13Z")

</div>

Hi Wim,

Unfortunately it will never be possile to adjust tags or make custom tags in liquid. Parts are only used to store a block of code, which you can call upon (as many times as you want) in another part.

You can also find more information about parts on our [read me site](https://developer.silverfin.com/docs/parts-include).

Regards,

Michiel

---

<div class="post-metadata">

**Author:** ![Wsteppe](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/wsteppe/32/1350_2.png) [@Wsteppe](https://community.silverfin.com/u/Wsteppe)\
**Post date:** [April 17, 2020, 9:30am UTC](https://community.silverfin.com/t/case-code-parts/1269/6 "2020-04-17T09:30:36Z")

</div>

That’s clear, thanks
