You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ partial:banner_cat }} is loaded within two views. Meaning two different routes. Meaning the CMS will only display the CMS-banner when using /categorie/{category:slug} this route at the moment. It won't respond to /product/{product:slug}. Both routes need the same partial.
The not so nice solution would be to create a new collection. And then create another Antlers-view that uses that collection. The partial doesn't need to change, but every product then need to set the category-banner. That is a lot of work and also doesn't make sense.
The best solution is to make the partial indepentent. I can see to obstacles:
The ProductController has two functions, that fetch category-data. Just to add the data to product-related queries.
The URLs do not match, since both function will be called from seperate routes.
The question is, should the category-data be indepentent from the back-end already, or should there be a solution with Antlers to catch this issue?
Check out #16 to research the origin of this problem.
The text was updated successfully, but these errors were encountered:
I want the banner partial showing the banner for the category the product has a relation with. Right now, the banner only works when the route for a category is handled. This banner partial checks if the the second part of the url match something set at the CMS. Of course this second part is a name of a category -> {{ collection:categorien :slug:is="segment_2" }}. Whenever a product is shown, the second part of the URL is a product.
{{ partial:banner_cat }}
is loaded within two views. Meaning two different routes. Meaning the CMS will only display the CMS-banner when using/categorie/{category:slug}
this route at the moment. It won't respond to/product/{product:slug}
. Both routes need the same partial.The not so nice solution would be to create a new collection. And then create another Antlers-view that uses that collection. The partial doesn't need to change, but every product then need to set the category-banner. That is a lot of work and also doesn't make sense.
The best solution is to make the partial indepentent. I can see to obstacles:
The question is, should the category-data be indepentent from the back-end already, or should there be a solution with Antlers to catch this issue?
Check out #16 to research the origin of this problem.
The text was updated successfully, but these errors were encountered: