SID-00522: Spaces in bullet list in formatted search are removed
| Status: |
Unanswered |
TWiki version: |
4.3.1 |
Perl version: |
|
| Category: |
CategoryForms |
Server OS: |
|
Last update: |
16 years ago |
I have a question regarding formatted search displaying bullet lists in a TWiki form field.
I was trying to prevent searches in forms from dropping results before the form is added to a template. So I decided to use “$percnt” instead of “%” at every search (so that the search is evaluated in the topic – not in the form yet).
Now the problem:
With formatted search you can separate the results in a bullet list by integrating the phrase “format=" * $topic: $formfield(Name)$n"” into the search.
However, the 3 spaces in front of the “*” are truncated to one, (maybe because the search is seen as prose text, because it is escaped by the $percnt).
Thus the bullets are not formatted correctly, instead there appears only the “*”.
How can I prevent the search from being executed and at the same time get a correctly formatted bullet list?
--
AaronBCaine - 2009-09-10
Discussion and Answer
If i understand your problem, I got around that once by using
separator="$n * " instead of the default of
$n (new line).
Since that's what is inserted between hits, I had to prefix the whole search with an additional bullet, like so:
* %SEARCH{...
If that doesn't answer your question, could you please provide an example?
--
SeanCMorgan - 2009-09-10
You can produce a bullet list using a
FormattedSearch, at least if placed in TWiki page content. See examples in
SearchPatternCookbook. It might not work if placed in TWiki form fields. Could you be more specific?
--
PeterThoeny - 2009-09-10
Dear Sean,
I´m sorry, but your solution doesn't work as well. The problem still appears.
I'll try to be more specific:
As I wrote before the "format" in my search is displayed as
format=" * $topic: $formfield(Name)$n"
instead of
format=" * $topic: $formfield(Name)$n"
My question is simply, if maybe it´s possible to “mask” the spaces in front the * , so there will still be 3 spaces instead of one (like for example you mask the “%” with “$percnt”), so the bullet lists are displayed correctly.
Thanks for your help!
--
AaronBCaine - 2009-09-11
You can make a bullet list with a <TAB> character instead of three spaces, maybe that works here? or $sp$sp$sp for three spaces?
--
SeanCMorgan - 2009-09-13
I'm sorry, but neither the <TAB> solution, nor the $sp way does work.
The Tab in the search is also truncated to one space and the $sp is written as "$sp" infront of the star, so its not executed anyway.
Perhaps a plugin is the only way to fix this problem...
--
AaronBCaine - 2009-09-17
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2009-11-23
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.