Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-08-06 17:08:50

DeHoe
New Member
Registered: 2014-08-06
Posts: 2

Textpattern Search in Single Article View -> not working

Hi,

as a Textpattern-Newbie I am not able to fix the following Problem:

On my Website, I have an Articles-Section with the typical Textpattern-Search-Form included. This Search-Form should only Search the Article-Section, which works very well in Article-List-View. The Browsers URL shows “Sitename/articles/?q=Searchterm” and the Search Results are correct.

But, whenever I start a Search in Single-Article-View, the Browser-URL shows this: “Sitename/articles/ArticleTitle?q=Searchterm” and no Search-Results are listed.

How can I make this search-form work also in Single-Article-View?

On the Sites-Template, the Search is included like this:

<txp:search_input form="search_input" />

The Form “search_input” looks like this:

<form role="search" method="get">
  <label for="search-textbox"><h3><txp:text item="search" /></h3></label>
  <p><input id="search-textbox" type="search" class="searchbox" name="q"<txp:if_search> value="<txp:search_term />" </txp:if_search>><input type="submit" class="button_ca searchbutton" value="<txp:text item='go' />"></p><br /><br />
</form>

I hope, this thing is easy to solve. Thanks in advance for your Help.

Greetings,
Dennis

Edit by gaekwad: added Textile for code block

Last edited by gaekwad (2014-08-07 06:48:33)

Offline

#2 2014-08-06 22:00:57

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

Re: Textpattern Search in Single Article View -> not working

Hi Dennis, try changing the first line to

<form role="search" method="get" action="<txp:site_url />articles/">

Offline

#3 2014-08-07 07:06:08

DeHoe
New Member
Registered: 2014-08-06
Posts: 2

Re: Textpattern Search in Single Article View -> not working

Hi Els,

that worked! Thank you so much!

Offline

Board footer

Powered by FluxBB