Can we include components using javascript?
Hi All,
We can include existing components in new component by adding,
<cq:include path="" resourceType="" />
Is it possible to achieve the same using javascript?
Like,
<script type="text/javascript">
var temp = "<cq:include path="sometext" resourceType="existing/component/path" />"
if(some condition){
$("#somediv").append(temp);
}
</script>
The above code is jus an illustration. I am into a situation where i have to use javascript to include a existing component.
Suggestions please.
Thanks,
Jai