This question about Using an extension: Asked

Use topic as an input for Twisty

Hello,

in case of complex topic search queries, I would like to store search results as an separate topic (ideally in a table with information from attached form and link to the topic).

Then, I would like to use information within mentioned topic as an input for Twisty plugin (as mentioned in Question1549).

How can I do that in such way, which will not require to embed another search within Twisty? Is there any format which might be used by Twisty directly?

-- MateuszKDzior - 16 Jan 2015

I think i understand what you're proposing... Let me try to give you some sample code using INCLUDEs of topic sections with custom "parameters". Here's the code:
%STARTSECTION{name="topicsearch" type="section"}%
%SEARCH{"form.name = 'QuestionForm' AND info.author = '%PERSON%'"
   type="query" 
  limit="5"
  nonoise="on"
  web="%WEB%" 
  header="---++ Questions from <nop>%PERSON%"
  format="$percntINCLUDE{\"%WEB%.%TOPIC%\" section=\"topicformat\" TARGET=\"$web.$topic\"}$percnt"
  separator=" $n $n"
}%
%ENDSECTION{name="topicsearch" type="section"}%

%STARTSECTION{name="topicformat" type="section"}%
---+++ [[%TARGET%][%QUERY{"'%TARGET%'/TopicTitle"}%]]
%TWISTY{link="Details"}%
| *Subject* | %QUERY{"'%TARGET%'/Subject"}% |
| *Extension* | %QUERY{"'%TARGET%'/Extension"}% |
| *Version* | %QUERY{"'%TARGET%'/Version"}% |
| *Status* | %QUERY{"'%TARGET%'/Status"}% |
%ENDTWISTY%
%ENDSECTION{name="topicformat" type="section"}%

Now, putting it into use, you can enter this:
%INCLUDE{"%WEB%.%TOPIC%"  section="topicsearch" PERSON="%WIKINAME%"}%
to get this:


I should say that this example does not actually reflect the simplest or most efficient way to achieve what it does. (You really could really do it all in one search with a couple of levels escaped.) But I hope it illustrates some useful methods to achieve what you're after.

-- LynnwoodBrown - 16 Jan 2015
 

QuestionForm edit

Subject Using an extension
Extension TwistyPlugin
Version Foswiki 1.1.9
Status Asked
Related Topics
Topic revision: r2 - 16 Jan 2015, LynnwoodBrown - This page was cached on 18 Jan 2018 - 23:09.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License