Home » Community » Coffee corner » [Skylark][witz] How would you do this
[Skylark][witz] How would you do this [message #51794] |
Fri, 31 May 2019 22:49  |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
Suppose in a witz
<a href=$Handler(v)>$Title</a>
Will produce in the resulting html document something like this
<a href="/display/1">Some Report</a>
My intended result is something like
<a href="/display/1.pdf#page=3">Some Title</a>
Basically, I need to put some text in the quoted text created by $Handler(v).
In my case $v and $Title are actually key and value of an entry in a ValueMap. I have attempted to make $v = "1.pdf#page=3", but don't know how to prevent it from being HTML escaped.
What's the suggested way of achieving the intended result?
[Updated on: Fri, 31 May 2019 22:50] Report message to a moderator
|
|
|
|
Re: [Skylark][witz] How would you do this [message #51800 is a reply to message #51794] |
Sun, 02 June 2019 17:56   |
|
Hi Lance,
Sorry for late reply... I believe that proper way to solve is to either
1) use raw function from witz standard library in your template
or
2) use Raw() in your code, to let the engine know that your value should not be escaped
I haven't use this in quite a long time, so I'm not exactly sure if it really fits into your scenario. But it should still work in general case.
Best regards,
Honza
|
|
|
|
Goto Forum:
Current Time: Fri May 09 20:10:26 CEST 2025
Total time taken to generate the page: 0.02012 seconds
|