On Tue, Apr 21, 2009 at 3:44 AM, DrunkenMonk <[email protected]> wrote:
>
> I tried this before using searches, and it did not seem to work, but I
> may have been wrong.
>
> However, my current use is:
> <code>
> [box händelse cols=32 rows=8][(list {?bt} template=kommentar
> output=escape)]
> [box]
>
> /*
> [[#kommentar]]
> [(template each)]{+:händelse}
> [[#end]]
> */
> </code>
>
> (I run the search function once on the previous page instead of
> several times on the current page)
>
> and the result is:
>
> test<br />test2<br />
This caused by a glitch in how the code is set up. Or perhaps a
necessity given some of the complexities of the vertical line spacing
issues in BoltWire. For some reason I set the separator between
templates in the the template, rather than the join variable by
default. I would like to change that, but don't want to mess things up
so, it's on a future to do list when I have some time. In the mean
time, I think you can perhaps do:
[box händelse cols=32 rows=8][(list {?bt} template=kommentar join=''
output=escape)]
> So I guess the list function does not escape like the search action
> should, even if the search action escapes?
The escape action does not work right in the templates. It's ill
conceived. I'll have to work on that as well. However you could try
fmt instead of template and it will likely work much better. (The
reason for this is the template command runs domarkup on each and
every template and then escapes the final output, where list generates
all the output and then escapes it. Template should skip the domarkup
part at every point when output=escape to work right. Another item on
my todo list).
> By the way,
> Is it possible to assign a variable and reach it on the same page in
> boltwire, such as:
>
> <code>
> result: [(search ... )]
>
> The result was: {result}
>
> I repeat, {result} was the result
> </code>
>
> Because I sorely miss that functionality.
The correct format for an info var like this is {::var}, so you could do this:
test: {(search group=test)}
here is the {::test}
and again {::test}
You can also do it with anchors like this:
[[#test]]
hellow world
hi there..
[[#end]]
here it is [(include {p}#test)]
and again [(include {p}#test)]
> hmmm. Does [(include {p}#test)] work the same way? Is that fast or
> does it reload the page for the include? How does the search function
> work, will this trigger a search each time, or is that cached so it
> doesn't affect speed?
All page reads in BoltWire are cached, so they are only read once.
Cheers,
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---