marcinczeczko on 398-config-defaults
marcinczeczko on backpressure-and-configs
Reorganized standaolone & examp… Merge branch 'milestone/backpre… Set a version of target release and 16 more (compare)
marcinczeczko on 398-config-defaults
Set target version for this bra… Merge branch 'milestone/backpre… (compare)
marcinczeczko on backpressure-and-configs
Set target version for this bra… (compare)
marcinczeczko on 398-config-defaults
Documentation fix. #394 Added encoding of uri para… Write a test case for requestin… and 5 more (compare)
"knotx:io.knotx.FilesystemRepositoryConnector": {
"options": {
"config": {
"catalogue": "./library/"
}
}
}
"knotx:io.knotx.HttpRepositoryConnector": {
"options": {
"config": {
"clientDestination": {
"domain": "localhost",
"port": 80
}
}
}
}
"knotx:io.knotx.KnotxServer": {
"options": {
"config": {
"repositories": [
{
"path": "/content/.*",
"address": "knotx.core.repository.http"
},
//routing, etc.
hi @malaskowski Thanks for your response. Consider we have search products page which will call third party services(via Knotx) to get the list of products based on user keyword. we have search component to show list of products.
We need to show "add to cart "component(Getting list of sellers via Knotx) for each product. So we added "add to cart" inside search component.
Please provide ur suggestion how to implement this.
If I understand correctly, you have a listing component, that displays a list of products by iterating product by product. Each product item contains an "add to cart" component, that is more complex and requires additional data to work (list of sellers).
Let's distinguish "component" (delivers functionality like product-card or add-to-cart-button) and "fragment" (a part of markup rendered by Knot.x using template engine) first.
One of the approaches would be actually doing the opposite I wrote above. In the latest Knot.x you may combine several components into a bigger fragment, so that your fragment pseudo markup would look like:
<fragment>
<product-listing>
for products in list
<product-card><add-to-cart-button/></product-card>
end
<product-listing>
</fragment>
Just note, that processing such a big fragment might be resources and time-consuming, make sure you leverage cache. You may also address this by doing more work on the data before it goes to the template engine module.
Since the Knot.x 2 version you may filter and combine data from multiple sources, even when one source depends on another (e.g. sellers list depending on product details). Using Actions and Tasks you may prepare your data in a way, rendering this markup behaves as the data came from a single source.