It almost works…Hopefully I’m just missing a bracket…
IF a tiddler has the prefix Questions for then remove the prefix. IF a tiddler tagged Question has a field called topic and in that field is the name of Questions for Something THEN write some text in the virtual tiddler Questions for Something and list the Question Tiddlers which are named in the topic field and match Questions for Something.
ELSE do it again but IF a tiddler tagged Question has a field called relevant and put some different text in there.
THEN do the div class bit at the end.
<%if [<storyTiddler>prefix[Questions for ]] %>
<$let parentTiddler={{{ [<storyTiddler>removeprefix[Questions for ]join[ ]] }}}>
<%if [<storyTiddler>tag[Question]contains:topic<parentTiddler>]] %>
Example exam and assignment questions for <$tiddler tiddler=<<parentTiddler>> > <$link/> </$tiddler>
<$list filter="[tag[Question]contains:topic<parentTiddler>]"><$link/><br/>
<%else%>
<%if [<storyTiddler>tag[Question]contains:relavent<parentTiddler>]] %>
Exam question that use this:<$tiddler tiddler=<<parentTiddler>> > <$link/> </$tiddler>
<$list filter="[tag[Question]contains:relevant<parentTiddler>]"><$link/><br/>
<%endif%>
<div class="kk-pdeck-examlist">
<$list filter="[enlist{!!exam}]" join=" | "><$text text=<<currentTiddler>>/></$list>
</div>