Displaying content slot on Product Listing #525
Replies: 9 comments
-
It's impossible, a content slot is like external service, you cannot determine if the content is configure or not. I will recommend to create default content if nothing is determine in the slot to always have 11 products to display (this could be done in the slot template) |
Beta Was this translation helpful? Give feedback.
-
Can you try solving this with category custom attribute, instead of a slot? Another option is to do the site design in a way, that it does not matter if there is slot or not. |
Beta Was this translation helpful? Give feedback.
-
Hi, you can't determine if the slot is configured in BE but at isml you can
certainly check this by using the SlotContent implicit object - this too is
available within slot rendering template only.
So, at the 12th position you do isslot, then in slot rendering template
check if the content is available, if yes then use a different css class on
the container div so that the products gets pushed down. But if the slot
content is not available then hide the container div, so that the products
from the parent template will fill this space.
I have done it on couple of occasions, let me know if you want to connect
on this.
The product rendering logic in the parent isml remains the same apart from
including the isslot. The magic happens in the slot rendering template and
is controlled by css classes
Thanks.
…On Tue, Mar 19, 2019, 9:25 PM Zlatin Zlatev ***@***.***> wrote:
Can you try solving this with category custom attribute, instead of a slot?
Another option is to do the site design in a way, that it does not matter
if there is slot or not.
e.g. make sure that you display it in a way that it blends with the rest
of the products.
for example, if you have grid 3 rows 4 products each, if the slot takes
space for 2x2 products, it would just "push down" some of the products, so
that grid becomes 4 rows by 4 positions (16 positions in which you display
the slot that takes 4 positions and 12 products in 12 positions)
If the slot is not configured, it would not take space and the page will
look like normal (3 rows 4 products each)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/12/comments/2>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aogm5bz4TdBjin3DjfYISDxEOrs-wxEOks5vYQhpgaJpZM4b8c55>
.
|
Beta Was this translation helpful? Give feedback.
-
And for this you do not have to determine if slot exists or configured at
server side (to set something in model). Handling it at isml will
suffice...
…On Tue, Mar 19, 2019, 10:06 PM Praveen Gaur ***@***.***> wrote:
Hi, you can't determine if the slot is configured in BE but at isml you
can certainly check this by using the SlotContent implicit object - this
too is available within slot rendering template only.
So, at the 12th position you do isslot, then in slot rendering template
check if the content is available, if yes then use a different css class on
the container div so that the products gets pushed down. But if the slot
content is not available then hide the container div, so that the products
from the parent template will fill this space.
I have done it on couple of occasions, let me know if you want to connect
on this.
The product rendering logic in the parent isml remains the same apart from
including the isslot. The magic happens in the slot rendering template and
is controlled by css classes
Thanks.
On Tue, Mar 19, 2019, 9:25 PM Zlatin Zlatev ***@***.***>
wrote:
> Can you try solving this with category custom attribute, instead of a
> slot?
>
> Another option is to do the site design in a way, that it does not matter
> if there is slot or not.
> e.g. make sure that you display it in a way that it blends with the rest
> of the products.
> for example, if you have grid 3 rows 4 products each, if the slot takes
> space for 2x2 products, it would just "push down" some of the products, so
> that grid becomes 4 rows by 4 positions (16 positions in which you display
> the slot that takes 4 positions and 12 products in 12 positions)
> If the slot is not configured, it would not take space and the page will
> look like normal (3 rows 4 products each)
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/12/comments/2>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/Aogm5bz4TdBjin3DjfYISDxEOrs-wxEOks5vYQhpgaJpZM4b8c55>
> .
>
|
Beta Was this translation helpful? Give feedback.
-
@zlatinz, Thanks I will try with category custom attribute and need to check with the client if they are okay with that. |
Beta Was this translation helpful? Give feedback.
-
Got it. If i am not wrong, the start and end query param changes in the
pagination url. For that you can create the url with in the rendering slot
template and keep it in hidden div and once the dom is loaded then just
copy this content at the real url placeholder div.
This way you will be able to create the url at FE only. And business will
ablso be able use the slots as usual.
Else, i guess you would need to go through the custom attribute way...
…On Tue, Mar 19, 2019, 10:30 PM himabindukadiyala ***@***.***> wrote:
@zlatinz <https://github.com/zlatinz>, Thanks I will try with category
custom attribute and need to check with the client if they are okay with
that.
@pravngaur <https://github.com/pravngaur>, the main issue here is, we are
constructing the pagination URLs on server side and to edit them I need to
determine if slot configured or not.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/12/comments/5>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aogm5WMynBco6AfnbI3_7HsDbEkt5uQoks5vYReYgaJpZM4b8c55>
.
|
Beta Was this translation helpful? Give feedback.
-
Generally you could use OCAPI to get the exact information about slots you need.
You can read about it here:
https://documentation.b2c.commercecloud.salesforce.com/DOC1/topic/com.demandware.dochelp/OCAPI/19.3/data/Documents/SlotConfiguration.html
But it needs to run in BM scope so it's a bit more challenging.
Am 19.03.19 um 18:17 schrieb Praveen Gaur:
Got it. If i am not wrong, the start and end query param changes in the
pagination url. For that you can create the url with in the rendering slot
template and keep it in hidden div and once the dom is loaded then just
copy this content at the real url placeholder div.
This way you will be able to create the url at FE only. And business will
ablso be able use the slots as usual.
Else, i guess you would need to go through the custom attribute way...
On Tue, Mar 19, 2019, 10:30 PM himabindukadiyala ***@***.******@***.***> wrote:
@zlatinz <https://github.com/zlatinz><https://github.com/zlatinz>, Thanks I will try with category
custom attribute and need to check with the client if they are okay with
that.
@pravngaur <https://github.com/pravngaur><https://github.com/pravngaur>, the main issue here is, we are
constructing the pagination URLs on server side and to edit them I need to
determine if slot configured or not.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/12/comments/5><https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/12/comments/5>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aogm5WMynBco6AfnbI3_7HsDbEkt5uQoks5vYReYgaJpZM4b8c55><https://github.com/notifications/unsubscribe-auth/Aogm5WMynBco6AfnbI3_7HsDbEkt5uQoks5vYReYgaJpZM4b8c55>
.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://github.com/orgs/SalesforceCommerceCloud/teams/community/discussions/12/comments/6>, or mute the thread<https://github.com/notifications/unsubscribe-auth/APVwJP6ZfJ5hnnq9pLgWCThaF-wqI4dFks5vYRungaJpZM4b8c55>.
…--
Mit freundlichem Gruß / Regards
Rico Nowak
Developer
holosystems GmbH & Co. KG
Hauptstrasse 16
99955 Herbsleben
Tel.: 036041 50914
Fax: 036041 50919
Mail: [email protected]<mailto:[email protected]>
URL: http://www.holosystems.de
_______________________________________________________________________________________________________
Bitte denken Sie über Ihre Verantwortung gegenüber der Umwelt nach, bevor Sie diese E-Mail ausdrucken!
Please consider the environment before printing this e-mail!
|
Beta Was this translation helpful? Give feedback.
-
@himabindukadiyala , |
Beta Was this translation helpful? Give feedback.
-
Thanks everyone! We are using category custom attribute for enabling/disabling this content slot. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, we have the following requirement: On Product Listing Page, 5th tile in the product grid will be content slot that can be managed by business. If content is configured for the category, the content will be displayed. If not, the content slot is not displayed and a product tile will take up the space. For example if the pageSize is 12 and there is content configured, then we display this slot and 11 products, otherwise we display 12 products on PLP.
I am facing an issue determining where the content is configured or not in the Business Manager. How can I check if there is content configured or not for a particular slot in frontend(isml) and in backend(model)? TIA!
Beta Was this translation helpful? Give feedback.
All reactions