> I don't understand why [results] is affected this way. I'm blocked
> here.
I found a solution. I removed [results] from the results page and put
a [(search)] instead. I removed the [session search] from both forms
too.
The sidebar search form now is:
[form action="{fieldURL}searchresults"]
[text query value="{?query}"]
[submit "Search"]
[session msg]
[form]
Notes:
1) It seems [session target] and [session nextpage] are not needed
when action is used in [form].
2) I created {fieldURL} in my farm wide config.php:
$BOLTvar['$fieldURL'] = $fieldURL; // set in index.php
$fieldURL is calculated in index.php:
if ($_SERVER["HTTP_HOST"]=="localhost") {
$cleanURL='http://localhost/mydomain/';
$fieldURL='http://localhost/mydomain/';
}
else {
$cleanURL='http://mydomain/';
$fieldURL='http://mydomain/';
}
The searchresults page now is:
[form]
[text query value="{?query}" ]
[submit "Search"]
[session msg]
[session nextpage {p}]
[form]
[(search text='{?query}' exclude='{site.config::systemPages}'
template=searchresults)]
Now everything works fine: The sidebar form sends the query string to
the results page, where the search function uses it to work and the
second form uses it as default for the next search.
Forms are the kernel of Boltwire, they allow to build real web
applications. I almost never used forms in my websites until now. It's
difficult to learn without easy and detailed examples, but I hope the
docs will be improved and completed in the near future.
Cheers,
Marcos
--
http://alinome.net
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---