Tags:
create new tag
view all tags

Question

I have some variables in perl script. I want to pass these variables as parameters to a topic. I know that this can be passed to a template.

Is there a way to do this? Please explain.

  • TWiki version: TWiki20030201
  • Perl version: 5.8
  • Web server & version: 1.3.27
  • Server OS: Windows XP
  • Web browser & version: IE 6.0
  • Client OS: Windows XP

-- SampturUmashankar - 28 May 2003

Answer

Not sure I understand your question. You can pass any variable to a TWiki topic as a URL paramter, e.g. .../bin/view/Web/TopicName?anyparam=ok, then display that in the topic using the %URLPARAM{}% variable, e.g. %URLPARAM{"anyparam"}%. An example in action is TWikiInstallations.

If you have a variable in a Plugin to display, you can introduce a new variable in the Plugin's commonTagsHandler callback routine. See TWikiPlugins for more.

-- PeterThoeny - 29 May 2003

Hello Peter,

Thanks very much. It worked. When I pass the variable as suggested by you, it can be seen in the address bar of the browser. Is there a way to hide it?

If you don't mind, I have more question, Can I pass more than one variable to a Twiki topic? smile

Regards,

Umashankar - 28 May 2003

-- SampturUmashankar - 28 May 2003

Hide parameters: In the HTML form you could use method="post" instead of method="get".

Multiple parameters: .../bin/view/Web/TopicName?anyparam=ok&param2=etc, then write %URLPARAM{"anyparam"}%, %URLPARAM{"param2"}%

-- PeterThoeny - 29 May 2003

Hello Peter,

Thanks very much.

Regards,

Umashankar

-- SampturUmashankar - 30 May 2003

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2003-06-01 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.