Add a sitewide search form??:!:
-
- Posts: 69
- Joined: Fri 2. Jul 2004, 01:46
- Contact:
Add a sitewide search form??:!:
Sorry for barraging you all with posts. You have been very helpful.
I want to put a search form in a template. I have searched the forums and I get a million results about this but with little relevant info.
Is search really only a Content Part? I don't understand the logic.
What if I want to put a search form in the left column of every page?
And how do I create the results page?
Thanks.
I want to put a search form in a template. I have searched the forums and I get a million results about this but with little relevant info.
Is search really only a Content Part? I don't understand the logic.
What if I want to put a search form in the left column of every page?
And how do I create the results page?
Thanks.
Hi stevenlyons
Here is the solution:
Put the following code into your templates left col ( may be, {SPACER:5x1} = free space on the left side and "width:135px" = length of the field, need adaption)
-------------------------------------------------------------------------------------
<!-- search on the left col //-->
<form action="###search_input_action:3###" method="post">
{SPACER:5x1}<input name="###search_input_field###" type="text" size="10" maxlength="50" value="###search_input_value###" style="font-size:10px; width:135px;">
<input type="submit" value="search" style="font-size:10px;">
</form>
-------------------------------------------------------------------------------------
The 3 is the ID of the article, where you must place in the content-part "search".
The structure-element, where you have put in this article, can be hidden in the structure-menu.
pepe
Here is the solution:
Put the following code into your templates left col ( may be, {SPACER:5x1} = free space on the left side and "width:135px" = length of the field, need adaption)
-------------------------------------------------------------------------------------
<!-- search on the left col //-->
<form action="###search_input_action:3###" method="post">
{SPACER:5x1}<input name="###search_input_field###" type="text" size="10" maxlength="50" value="###search_input_value###" style="font-size:10px; width:135px;">
<input type="submit" value="search" style="font-size:10px;">
</form>
-------------------------------------------------------------------------------------
The 3 is the ID of the article, where you must place in the content-part "search".
The structure-element, where you have put in this article, can be hidden in the structure-menu.
pepe
-
- Posts: 69
- Joined: Fri 2. Jul 2004, 01:46
- Contact:
-
- Posts: 69
- Joined: Fri 2. Jul 2004, 01:46
- Contact:
oops wait I spoke too soon. It only works on the page with the search content part (the ID:9 page). It does not work on any other pages, even though the form is visible on all pages. ???
I have created a search structure level and a search page with a search content part. Here's the code I am using for the search form:
I have created a search structure level and a search page with a search content part. Here's the code I am using for the search form:
Code: Select all
<form action="###search_input_action:9###" method="post">
<input name="###search_input_field###" type="text" size="11" maxlength="50" value="###search_input_value###" style="font-size:10px;"><input type="submit" value="search" style="font-size:10px;">
</form>
-
- Posts: 69
- Joined: Fri 2. Jul 2004, 01:46
- Contact:
Thanks for your help, Pepe. I think I am already using the article ID, but just to make sure...exactly how do I find the article ID? Is it the ID that is shown in blue-grey in the content part summary (article page)?
Because I could not make it work, I have removed the search field from the template and now just have a link to the article that contains the search content part. You can see the early design here (nothing special--its a very simple site for a health watch-dog group):
Marin Health Fund
S.
Because I could not make it work, I have removed the search field from the template and now just have a link to the article that contains the search content part. You can see the early design here (nothing special--its a very simple site for a health watch-dog group):
Marin Health Fund
S.
stevenlyons wrote:Thanks for your help, Pepe. I think I am already using the article ID, but just to make sure...exactly how do I find the article ID? Is it the ID that is shown in blue-grey in the content part summary (article page)?
Because I could not make it work, I have removed the search field from the template and now just have a link to the article that contains the search content part. You can see the early design here (nothing special--its a very simple site for a health watch-dog group):
Marin Health Fund
S.
You will find the article ID, if you are in the article center.
It's the ID, wich is shown in a little yellow window, if you are over the small RED crossed field, just before the articlename.
You will see the Text: article ID:xx then.
pepe
PS
Please proof, if there are unnecessary spacer in the used code
It might be possible, that that's the reason why... (It seems to be so)
-
- Posts: 69
- Joined: Fri 2. Jul 2004, 01:46
- Contact:
That's interesting. I am using a mac and none of my browsers (Internet Explorer, Safari, Firebird, Opera ) show this. They do show the hint windows for the other interface widgets (cut, delete, etc), but not for the red x icon to the left of the article title. Is there a way to extract the article ID from the URL?
I am assuming it is the number 4 in this string?
Code: Select all
index.php?id=11,4,0,0,1,0
-
- Posts: 69
- Joined: Fri 2. Jul 2004, 01:46
- Contact:
Hello
I have created the search page and it works, but when i put the search tool in the template don't have the action in the form.
My search page have ID 19 and i have this in the template
¿What's wrong?
Thanks
I have created the search page and it works, but when i put the search tool in the template don't have the action in the form.
Code: Select all
<form action="" method="post">
Code: Select all
<form action="###search_input_action:19###" method="post">
Thanks