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.
Views
Replies
Total Likes
If you try each one on its own - does it work?
Views
Replies
Total Likes
Yes If I am putting each one on its own , it is working fine.
Views
Replies
Total Likes
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?
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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>
Views
Replies
Total Likes