Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Team,
I am not sure how difficult it would be to implement, but it would be very useful to have the ability to do something like this: :myvar: blue ifeval::[ "{myvar}" == "blue" OR "{myvar}" == "red" ] This is for categories that are blue or red. else::[] This is for categories that are not blue or red endif::[] At the moment, I believe the only way to achieve the above is by doing: :myvar: blue ifeval::[ "{myvar}" == "blue" ] This is for categories that are blue or red. endif::[] ifeval::[ "{myvar}" == "red" ] This is for categories that are blue or red. endif::[] ifeval::[ "{myvar}" != "blue" ] ifeval::[ "{myvar}" != "red" ] This is for categories that are not blue. endif::[] endif::[] Marc |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I didn’t try this, but I’d expect something like this might work:
ifeval::["{myvar}" == “blue”] :myvarblue: yes endif::[] feval::["{myvar}" == “red”] :myvarred: yes endif::[] :myvarblueorred: {myvarblue}{myvarred} ifeval::[ “{myvarblueorred}” != “” ] This is for categories that are blue or red. endif::[] ifeval::[ “{myvarblueorred}” ==“” ] This is for categories that are neither blue nor red endif::[] “AND” could be done similarly (e..g == ‘yeses”) At this point I have no opinion on whether your suggestion might be a good idea or not, but there might be a slightly less inconvenient workaround available now. david jencks
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In reply to this post by 1marc1
I would love to see this feature as well. Without it, ifeval is often difficult to use, even if there are workarounds. I tend to use something such as:
For the OR: :myvar: blue ifeval::[ "{myvar}" == "blue" ] :group1: endif::[] ifeval::[ "{myvar}" == "red" ] :group1: endif::[] ifdef::group1[] For blue or red endif::[] ifndef::group1[] For not blue and not red endif::[] For the AND: :myvar1: blue :myvar2: green ifeval::[ "{myvar1}" == "blue" ] ifeval::[ "{myvar2}" == "red" ] :group2: endif::[] endif::[] ifdef::group2[] For var1 = blue and var2 = red endif::[] and so on. It is slightly off-topic, but a long-form for ifeval would also be nice if possible. |
Free forum by Nabble | Edit this page |