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

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


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 ?

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:

Regards,

Woonsan

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 :slight_smile: