Page 1 of 1

Search Content Part

Posted: Tue 17. Feb 2009, 20:45
by bench1254
I have the search feature implemented within all pages of a site.

How do I get the results to populate the content portion only? when the results are returned, I get all the search results and then at the bottom of the page -- all the text that was on the page to begin with.

Thoughts?

Re: Search Content Part

Posted: Tue 17. Feb 2009, 23:05
by Jensensen
bench1254 wrote:... How do I get the results to populate the content portion only? ...
Not possible, i think.
bench1254 wrote:... when the results are returned...
the search word will be in some article.

NOTE:
A) Every article in which the expression (search word) was found gets listed.
B) For this kind of --> listing --> the headline and the summary text of EACH article is used truncated by the 'read more...' link.
bench1254 wrote:... then at the bottom of the page -- all the text that was on the page to begin with ...
I don't understand. What do you mean with "at the bottom -- all the text"? Could you provide us with a link?

Unfortunately there's still no template :cry: for the CP 'search'. The best way when you want nice results -- visually --, you have proper --> summary texts for each article.
[keep also the article templates in mind!]

Re: Search Content Part

Posted: Wed 18. Feb 2009, 03:22
by bench1254
Unfortunately, I can not post a link -- proprietary information prior to release of the site. But let me try to explain better.

Say, I have an article with "plain text" content saying something like "This text is about us"
within the template I place a Search function by way of {SHOW_CONTENT;CPXXXX}

When the Search function is executed, I get the following results in the main content section of the site:


---Search Result summary #1---
---Search Result summary #2---
---etc, etc and more summary---

---This text is about us---(plain text content) <---WHY IS THIS SHOWING UP IN THE RESULT LIST?

Thanks again.

Re: Search Content Part

Posted: Wed 18. Feb 2009, 20:52
by Jensensen
I couldn't find the expression '(plain text content)' or 'plain text content' in any file of the program. I've searched through v1.3.3 up to v1.4.1.
Could be because of a comment tag that wasn't properly closed. Must be somewhere in your page, templates, content.

Re: Search Content Part

Posted: Wed 18. Feb 2009, 21:18
by breitsch
You should not place the search result listing in your template, not with a SHOW_CONTENT RT either.

Add a hidden structure (frontend menu status: x hide) and add the article with only the search CP to this structure.
if you want to see the search field on all your sites you can add this to your template.

Something like:

Code: Select all

<form action="index.php?search" method="post" name="searchform">
	<table width='125' cellspacing='0' cellpadding='0' border='0'>
		<tr>
			<td width="100"><input name="search_input_field" id="search_input_field" maxlength="100" style="height:15px;font-size:10px;width:100px;" type="text" value="Suchtext eingeben" onfocus="if(this.value == 'Suchtext eingeben') this.value='';" onblur="if (this.value=='') this.value='Suchtext eingeben';" /></td>
			<td width="25"><a href="#" onmouseover="top05.src='picture/layout/search002.gif'" onmouseout="top05.src='picture/layout/search001.gif'" onclick="document.searchform.submit();">
					<img name="top05" src="picture/layout/search001.gif" alt="Suchen" title="Suchen" width="25" border="0" height="25" /></a></td>
		</tr>
	</table>
</form>
index.php?search -> your hidden structure must have alias 'search'
the example uses a mouseover with two images as button

see it in action here: http://www.paf-kirchberg.ch/PaF/index.php