<!-- keep this as a security measure: * Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup,Main.LCGAdminGroup * Set ALLOWTOPICRENAME = Main.TWikiAdminGroup,Main.LCGAdminGroup #uncomment this if you want the page only be viewable by the internal people #* Set ALLOWTOPICVIEW = Main.TWikiAdminGroup,Main.LCGAdminGroup --> ---+ Change parentship in a quick manner You need to copy this to the page you want to be the parent, and search for the thing you want. ---++ This is the table to search for childrens of the current page <verbatim>%SEARCH{ "META\:TOPICPARENT.*\"%TOPIC%\"" type="regex" format="| [[$topic][ $pattern(.*---\+!*\s+([^\n\r]+).*) ]] | !$topic | $createdate | $createwikiusername |" order="created" nosearch = "on" reverse="on" header = "" }%</verbatim> %SEARCH{ "META\:TOPICPARENT.*\"%TOPIC%\"" type="regex" format="| [[$topic][ $pattern(.*---\+!*\s+([^\n\r]+).*) ]] | !$topic | $createdate | $createwikiusername |" order="created" nosearch = "on" reverse="on" header = "" }% ---++ And this is the search with a button to set targets as child of the current page: <verbatim>%SEARCH{ "Meeting" regex="on" casesensitive="on" order="created" reverse="on" scope="topic" excludetopic="MeetingTemplate" nosearch="on" nototal="on" header="| *Title* | *Wikiname* | *Created on* | *Action* | *Parent* | *Creator* |" format="| $pattern(.*---\+!*\s+([^\n\r]+).*) | $topic | $createdate | \ <form name=\"new\" action=\"%SCRIPTURLPATH{save}%/%WEB%/$topic\" method=\"post\" > \ <input type=\"hidden\" name=\"redirectto\" value=\"%TOPIC%\" /> \ <input type=\"hidden\" name=\"topicparent\" value=\"%TOPIC%\" /> \ <input type='submit' class='twikiButton' value='Set as child' /> </form> \ | $parent | $createwikiusername |" }%</verbatim> %SEARCH{ "Meeting" regex="on" casesensitive="on" order="created" reverse="on" scope="topic" excludetopic="MeetingTemplate" nosearch="on" nototal="on" header="| *Title* | *Wikiname* | *Created on* | *Action* | *Parent* | *Creator* |" format="| $pattern(.*---\+!*\s+([^\n\r]+).*) | $topic | $createdate | \ <form name=\"new\" action=\"%SCRIPTURLPATH{save}%/%WEB%/$topic\" method=\"post\" > \ <input type=\"hidden\" name=\"redirectto\" value=\"%TOPIC%\" /> \ <input type=\"hidden\" name=\"topicparent\" value=\"%TOPIC%\" /> \ <input type='submit' class='twikiButton' value='Set as child' /> </form> \ | $parent | $createwikiusername |" }% -- Main.PabloFernandez - 2011-01-13
This topic: LCGTier2
>
WebHome
>
ToolsBoard
>
ChangeParentshipDoingSearches
Topic revision: r1 - 2011-01-13 - PabloFernandez
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback