Set Public "or" Private url in navigation

Avatar

Avatar
Validate 10
Level 3
sunitac2231600
Level 3

Likes

4 likes

Total Posts

90 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
sunitac2231600
Level 3

Likes

4 likes

Total Posts

90 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
sunitac2231600
Level 3

22-09-2016

Hi All,

When I am putting "or" in between private and public URL then It is not working.

<div data-sly-use.curpage="${'navlink.js' @ navPagePath=page.privatelinkurl || page.publicurl}" data-sly-unwrap> 

Can anybody tell me If I am doing some wrong here

thanks in advance.

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,410 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,410 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

23-09-2016

If you try each one on its own - does it work? 

Avatar

Avatar
Validate 10
Level 3
sunitac2231600
Level 3

Likes

4 likes

Total Posts

90 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
sunitac2231600
Level 3

Likes

4 likes

Total Posts

90 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
sunitac2231600
Level 3

23-09-2016

Yes If I am putting each one on its own , it is working fine.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,410 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,410 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

23-09-2016

I am looking for docs that state an OR operator is supported - did you find that - or are you using it without seeing an example? 

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,410 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,410 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

23-09-2016

In this doc:

https://docs.adobe.com/docs/en/htl/docs/block-statements.html

it shows use of the || operator. In you example - did you setup a variable? 

For example - docs state:

The result of a test can be assigned to a variable that can be used later. This is usually used to construct "if else" logic, since there is no explicit else statement:

 <p data-sly-test.abc="${a || b || c}">is true</p>
<p data-sly-test="${!abc}">or not</p>

Avatar

Avatar
Validate 10
Level 3
sunitac2231600
Level 3

Likes

4 likes

Total Posts

90 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
sunitac2231600
Level 3

Likes

4 likes

Total Posts

90 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
sunitac2231600
Level 3

23-09-2016

Yes from document only I tried to put the OR operator . But It is not working. Thats why I posted in the forum for help.