Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How can I test whether both the field are not empty in dialog in sightly

Avatar

Avatar
Boost 5
Level 2
keerthana_hn
Level 2

Likes

6 likes

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Validate 1
View profile

Avatar
Boost 5
Level 2
keerthana_hn
Level 2

Likes

6 likes

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Validate 1
View profile
keerthana_hn
Level 2

20-07-2021

Hi all,

 

I'm trying check whether both the fields are present in the dialog using or condition. It is failing how can I use 'or' condition in data-sly-test for fields renditions in single div.

 

<div data-sly-test="${contentFragmentMap.elementsMap.twitterLinkGeneral}" || data-sly-test="${contentFragmentMap.elementsMap.linkedinLinkGeneral}" class="cmp-auth-profile__social-buttons">

 

I tried above statement but its failing. Can anyone help me with this?

 

Thank you

View Entire Topic

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,048 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,048 posts

Correct Reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

21-07-2021

@keerthana_hn In your query ( i copied it below) you need to remove the characters marked in bold letters 

 

<div data-sly-test="${contentFragmentMap.elementsMap.twitterLinkGeneral}" || data-sly-test="${contentFragmentMap.elementsMap.linkedinLinkGeneral}" class="cmp-auth-profile__social-buttons">

 

AS others mentioned it should be

 

<div data-sly-test="${contentFragmentMap.elementsMap.twitterLinkGeneral || contentFragmentMap.elementsMap.linkedinLinkGeneral}" class="cmp-auth-profile__social-buttons">

 

Thanks

Veena