The conditional operators that work in EE are listed in the documentation.
The two conditional forms you talk about are not equivalent, they just happen to give the same outputs for the inputs you describe.
The first form (with the &&
in it) only fires if the url_title is not portfolio
and also not photos
. So if you tested the url_title hot
with this conditional it would return TRUE (since hot
is neither portfolio
nor photos
).
The *=
term in second form tests to see if the the content of first term (in your example the string portfolio|photos
contains the value in segment_2. When you add the negative operator (!
) this returns TRUE only if the content of segment_2 is not contained within the string. This is similar in function to the first conditional but not the same: it will return "FALSE" for any circumstance where the content of segment_2 is found in your string - so not only for the url_titles portfolio
and photos
but also hot
, folio
and port
(and many more).
So while the first conditional only looks for the two terms specified, the second looks for any combination of letters that might appear within the conjoined strings you have used. Which means the second conditional is not a simplification of the first, it is different to the first but under some conditions provides similar outputs.
HTH