Question
I'd like to add the option to set or change the parent of a topic directly from the edit template. It seems to me that this should do the job:
<!--
* Set MYPARENT = %SEARCH{ "^%BASETOPIC%$" scope="topic" nosearch="on" type="regex" nototal="on" format="<nop>$parent" }%
-->
<label for="topicparent">%MAKETEXT{"Parent of this topic:"}% </label>
<select name="topicparent" id="topicparent">
<option id="tp_none" value="">(none)</option>
%TOPICLIST{"<option $marker id='tp_$name' value='$name'>$name</option>" selection="%MYPARENT%"}%
</select>
But MYPARENT is either not being set, or it is not being seen by the TOPICLIST exapansion. I've had to resort to Javascript to compute the right selection, but I feel like there must be a better way.
Environment
--
TWikiGuest - 13 Mar 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Remove the
<nop> from before the $parent in the SEARCH.
--
CrawfordCurrie - 11 Apr 2006