Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-02-11 09:56:53

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: Can't get the search to do what I want

My search box is on every page of the website so when you type something into it, and press search, it bring up the search results page, when you click on one of the displayed search results it bring up the page now when you click on a link on this page it just reloads the page over and over.

this is in the search form: <h3><txp:permlink><txp:section title=“1” limit=“999”/></txp:permlink></h3>
<txp:excerpt />
<p><search_result_url /></p>

Offline

#14 2008-02-11 17:32:34

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Can't get the search to do what I want

The limit="999" can’t be used in <txp:section />. It belongs in a <txp:article />tag.

My search box is on every page of the website so when you type something into it, and press search, it bring up the search results page, when you click on one of the displayed search results it bring up the page

So far so good, if I understand correctly?

now when you click on a link on this page it just reloads the page over and over.

This looks to me it has nothing to do with your search results setup. Can you post:

  1. the code on that page (the one that is being reloaded)
  2. the content of the article forms that are used in the article tag(s) on that page

Offline

#15 2008-02-12 10:00:47

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: Can't get the search to do what I want

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title><txp:page_title /></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="HAPedit 3.1">
<style type="text/css">
body{
	background-color: #FFF;
	background-image: url(images/background.gif);
	background-attachment: fixed;
}

div#nifty{
	background:#FFFFFF;
	margin-top: 15px;
	width: 731px;
	margin-right: auto;
	margin-left: auto;
	padding-right: 0px;
	padding-left: 0px;
}
</style>
<link rel="stylesheet" href="/css08/screenc.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="/css08/printc.css" type="text/css" media="print">	
<link rel="stylesheet" href="/css08/buildc.css" type="text/css" media="screen">
<link rel="stylesheet" type="text/css" href="/css08/niftyCorners.css">
<link rel="stylesheet" type="text/css" href="/css08/niftyPrint.css" media="print">
<link href="/css08/menu.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/css08/nifty.js"></script>
<script type="text/javascript" src="/css08/menu/menu.js"></script>
<script type="text/javascript">
window.onload=function(){
if(!NiftyCheck())
    return;
Rounded("div#nifty","top","#9FC3D8","#D1E5FF","border #C0C0C0","smooth");
Rounded("div#nifty","bottom","#A8C7DB","#FFFFFF","border #C0C0C0","smooth");
}
</script>

</head>
<body>
<div id="nifty">

<div class="container">
<div class="column span-24">

				<div class="header">

					<h1>name1; </h1>
					<h2>name2</h2>
					<p><a href="/"><img src="/images/mtcug_logo.gif" alt="mtcuog logo" width="101" height="105" class="glamlogo"></a></p>

					<form action="/search" method="get" name="search" id="search">
						<p><a href="cymraeg">Cymraeg</a> | <a href="accessibility">Accessibility</a><br />
						<input name="q" size="18"> <input type="submit" value="Search" class="button"/>
						</p>
</form>

  </div>

				 <div class="navi">

<script type='text/javascript' src='/css08/menu.js'></script>
<txp:article_custom id="428" form="home_ed"/>
<!-- Create Menu Settings: (Menu ID, Is Vertical, Show Timer, Hide Timer, On Click, Right to Left, Horizontal Subs, Flush Left) -->
<script type="text/javascript">qm_create(0,false,0,500,false,false,false,false);</script>


</div>


				<div class="bluebox">

				 	Home - Welcome</div>
</div>

	                <div class="column span-8 first border">

					<div class="promo">

						<txp:article_custom id="2" form="home_ed" />

					</div>


					</div>


	                <div class="column span-16 last">
					  <div class="promo">


							<txp:article_custom id="3" form="home_ed" />
					  </div>

	                </div>
						<hr>

					<div class="column span-8 first border">

					<div class="news">


					  <txp:article_custom id="5" form="home_ed" />
						  <br>
					      <br>
					  </p>

</div>
					</div>

	                <div class="column span-8 border">

						<br>

						<txp:article_custom id="4" form="home_ed" />

					</div>

<div class="column span-8 last">

<txp:article_custom id="8" form="home_ed" />



</div>
	<hr>
	        <div class="column span-24">
	          <div class="footer">

					<h5>name3</h5>
					<h5>name4</h5>
				  <h5>© name5</h5>
					<a href="quality"><img src="/images/qs_logo.gif" alt="qs logo" width="30" height="41" class="qslogo"></a>
					<a href="investors"><img src="/images/iip.gif" alt="iip logo" width="53" height="36" class="iiplogo"></a>
					<a href="positive"><img src="/images/pos_l.gif" alt="pos l logo" width="47" height="36" class="posllogo"></a>
					<a href="positive"><img src="/images/pos_r.gif" alt="pos r logo" width="45" height="36" class="posrlogo"></a>
					<a href="esf"><img src="/images/esf.gif" alt="esf logo" width="128" height="28" class="esflogo"></a></div>
</div>	
</body>
</div>
</body>
</html>

Here is the general format for my pages, (it keeps reloading everyone, referring back to my previous post)

Here is an home_ed article form: <txp:body />

Thanks for your help

(Edited for better display of code. -Els)

Last edited by els (2008-02-12 22:08:17)

Offline

#16 2008-02-12 12:01:19

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Can't get the search to do what I want

First, I don’t see there <txp:article /> tag. Without it you can’t show your search results. Also you should fix your your HTML output. The doctype is HTML 4.01, but I see there XHTML tags, that won’t work. In example there is <input type="submit" value="Search" class="button" /> ;)

Last edited by Gocom (2008-02-12 12:01:46)

Offline

#17 2008-02-12 22:23:18

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Can't get the search to do what I want

Gocom, the way I understood gmorgan is that this is not the search results page, but the page that is displayed after clicking a link in one of the search results. Am I right, gmorgan?

gmorgan wrote:

now when you click on a link on this page it just reloads the page over and over.

The only links I see on this page are the ones in your footer:

<a href="quality"><img src="/images/qs_logo.gif" alt="qs logo" width="30" height="41" class="qslogo"></a>
<a href="investors"><img src="/images/iip.gif" alt="iip logo" width="53" height="36" class="iiplogo"></a>
<a href="positive"><img src="/images/pos_l.gif" alt="pos l logo" width="47" height="36" class="posllogo"></a>
<a href="positive"><img src="/images/pos_r.gif" alt="pos r logo" width="45" height="36" class="posrlogo"></a>
<a href="esf"><img src="/images/esf.gif" alt="esf logo" width="128" height="28" class="esflogo"></a></div>

Because in your article form there is only <txp:body />, and no permlink.

Are these the not-working links you were referring to? If so, are they supposed to link to articles? Are ‘quality’, ‘investors’ etcetera article titles? If so, you’d better link to them like this:

<a href="<txp:permlink id="123" />"><img src=etcetera... /></a>

If I misunderstood you just let me know :)

Offline

#18 2008-02-15 10:03:20

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: Can't get the search to do what I want

I think I now know whats gone wrong I’ve missed the / off certain links, I’ll give it a try and get back to you, without your help I wouldnt have noticed this.

Offline

#19 2008-02-15 10:06:32

gmorgan
Member
Registered: 2007-11-26
Posts: 42

Re: Can't get the search to do what I want

Yup all now working, just going to take me an age to fix all my pages.

Offline

Board footer

Powered by FluxBB