Question
I have made a topic called ParameterisedSearchPage, containing:
Topics belonging to: %URLPARAM{username}%
<ul>
%SEARCH{"META:FORM{name=\"UserTopic;META:FIELD{name=\"UserName.*? value=\"%URLPARAM{username}%" regex="on" format="<li>$topic"}%
</ul>
A link works fine, e.g. clicking
<a href="%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/ParameterisedSearchPage?username=DonaldDuck">Donalds topics</a>
makes a jump to ParameterisedSearchPage, showing
Donalds topics, but not Goofys, Mickeys... etc. , e.g.:
Topics belonging to: DonaldDuck
- TaskWorkOnTemper
- GoodIdeaDoNotTeaseBees
- TaskWorkOnSpeechProblem
Now
I wish to INCLUDE Donalds topics on Donalds homepage (Main.DonaldDuck) writing:
%INCLUDE{%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/ParameterisedSearchPage?username=DonaldDuck}%
This does not work for two reasons (I guess):
- My
%SCRIPTURL% resolves to https://.... (and not http://..., see HowToIncludeWithUrlParam)
- The
view script requires authentication, i.e. on our site you must log on even to view a page
and the TWiki server does not contain user authentication when it does the URL GET thing
Does anybody
- know a work-around? or
- have a suggestion for some development task that we might perform to remedy this situation?
e.g. %INCLUDERENDERED{ParameterisedSearchPage?usename=DonaldDuck}%
--
NielsKoldso - 31 Aug 2004
Environment
| TWiki version: |
TWikiRelease01Feb2003 |
| TWiki plugins: |
- |
| Server OS: |
- |
| Web server: |
- |
| Perl version: |
- |
| Client OS: |
- |
| Web Browser: |
- |
--
NielsKoldso - 31 Aug 2004
Answer
How about using
SpreadSheetPlugin formulae?
In the including topic write this:
%CALC{"$SET(username,DonaldDuck)"}%
%INCLUDE{"ParameterisedSearchPage"}%
In ParameterisedSearchPage write this:
%SEARCH{"META:FORM{name=\"UserTopic;META:FIELD{name=\"UserName.*? value=\"%CALC{$GET(username)}%" regex="on" format="| $topic |"}%
This should work regardless of authentication, hhtp or https.
--
PeterThoeny - 03 Sep 2004
Also, I imagine either
MacrosPlugin or
TopicVarsPlugin will also do what you want.
--
MartinCleaver - 08 Sep 2004
Thanx a lot for your answers Peter and Martin.
I found that the
MacrosPlugin worked best for me after
I slightly hacked it to not show everything, c.f.
MacrosPluginDev
--
NielsKoldso - 14 Sep 2004