Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Skylark » witz - handler with variable parameter (Can witz handlers take non-constant parameters?)
witz - handler with variable parameter [message #54318] Tue, 23 June 2020 02:31 Go to next message
Lance is currently offline  Lance
Messages: 526
Registered: March 2007
Contributor
Say I have a handler

SKYLARK(Test,"test/**")
{
	DUMP(http.GetParamCount());
	http<<"number of param :"<<http.GetParamCount();
}


And in the witz, I want to use it with a parameter called 'p'
<a url=$Test($p,3,5,7)>A link</a>


Suppose the parameter "p" has been correctly passed to the witz before calling renderResults.

Above won't work. The generated url is 'test//3/5/7' with $p treated as undefined. Did I do anything wrong?

Thanks for your help!
Re: witz - handler with variable parameter [message #54319 is a reply to message #54318] Tue, 23 June 2020 04:22 Go to previous message
Lance is currently offline  Lance
Messages: 526
Registered: March 2007
Contributor
I figured it out by accident. Just remove the '$' before p will fix the problem.

witz should read
<a url=$Test(p,3,5,7)>A link</a>

[Updated on: Tue, 23 June 2020 04:23]

Report message to a moderator

Previous Topic: Skylark - Witz on the fly
Next Topic: stable
Goto Forum:
  


Current Time: Fri Apr 19 12:29:40 CEST 2024

Total time taken to generate the page: 0.08181 seconds