# The component is processed while I don't use it in \<hst:include\>

**URL:** <https://community.bloomreach.com/t/the-component-is-processed-while-i-dont-use-it-in-hst-include/516>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [October 22, 2018, 10:16am UTC](https://community.bloomreach.com/t/the-component-is-processed-while-i-dont-use-it-in-hst-include/516 "2018-10-22T10:16:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThoLe](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/thole/32/98_2.png) [@ThoLe](https://community.bloomreach.com/u/ThoLe)\
**Post date:** [October 22, 2018, 10:16am UTC](https://community.bloomreach.com/t/the-component-is-processed-while-i-dont-use-it-in-hst-include/516/1 "2018-10-22T10:16:39Z")

</div>

Hello,

Today I just found down that if in hst:pages I declared hst:containeritemcomponent but in the actual template I don’t include the component in the response hst:include then server still process the rendering for this component. It means doBeforeRender() invoked and related template is executed.

This is not a bug as the Hippo guys already mention it here

> **[HstComponent Configuration - Enterprise Java Content management system - Hippo...](https://www.onehippo.org/library/concepts/component-development/hstcomponent-configuration.html)**
>
> Hippo Open Source Enterprise Content Management

  
But for me that is not a good design because there are many situations that the developer want to control the rendering in template file for example  
\<c:if test=“condition”\>\<hst:include ref=“abc”/\>\</c:if\>

What do you think brothers ?

---

<div class="post-metadata">

**Author:** ![woonsanko](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@woonsanko](https://community.bloomreach.com/u/woonsanko)\
**Post date:** [October 22, 2018, 1:23pm UTC](https://community.bloomreach.com/t/the-component-is-processed-while-i-dont-use-it-in-hst-include/516/2 "2018-10-22T13:23:24Z")

</div>

> [@ThoLe](#):
>
> But for me that is not a good design because there are many situations that the developer want to control the rendering in template file for example  
> \<c:if test=“condition”\>\<hst:include ref=“abc”/\>\</c:if\>

We have not had many use cases for conditional component inclusion/exclusion so far. And it seems to have been good enough to allow only by hst configurations.  
But, you might have found some inconvenience there. For that kind of corner case, we have another option you might want to take a look:

- [Component Filtering with HstComponentWindowFilter - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS](https://www.onehippo.org/library/concepts/miscellaneous/component-filtering.html)

Regards,

Woonsan

---

<div class="post-metadata">

**Author:** ![ThoLe](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/thole/32/98_2.png) [@ThoLe](https://community.bloomreach.com/u/ThoLe)\
**Post date:** [October 23, 2018, 7:37am UTC](https://community.bloomreach.com/t/the-component-is-processed-while-i-dont-use-it-in-hst-include/516/3 "2018-10-23T07:37:24Z")

</div>

Hi Woonsan,

I have applied your solution ( component-filtering ) and it worked for our case. I used the same condition to filter component with the one using in template hst:include

Thank you 🙂
