Each teachers teach one or more subject. Maths, or Maths and Sciences for instance. I'd like to display only nodes with Maths in it. But I want to display every nodes with Maths in it even if there's another subject with it.
So, in my example $subjectChoosen = Maths, but for now it only displays the Maths only teachers and not the Maths and sciences teachers even if there is Maths in the teacherSubject parameter.
Select nodes that match one or more words
Hi guys, I have a (probably simple) problem with my xslt (legacy mode).
Here's my code :
Each teachers teach one or more subject. Maths, or Maths and Sciences for instance. I'd like to display only nodes with Maths in it. But I want to display every nodes with Maths in it even if there's another subject with it.
So, in my example $subjectChoosen = Maths, but for now it only displays the Maths only teachers and not the Maths and sciences teachers even if there is Maths in the teacherSubject parameter.
Do you understant my question?
Thank you!
Hi,
What does teacherSubject look like? Is it a delimited string?
Maybe something with the contains() function? (not tested)
In this case you might consider delimiting like ',Math,Science,' and search for ',Math,' so no partials are accidentally returned.
Let us know if this works for you..
-Tom
I, thank you for your reply. In the macro parameter, it's a string. But in the my docType it's defined by checkbox. I'll try with the contains.
Thank you, it worked with contains.
is working on a reply...