Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-10-11 19:40:36
- User61
- New Member
- From: Malaysia
- Registered: 2005-04-01
- Posts: 8
Remove <br /> from <txp:search_input /> output
Hi all,
<code><txp:search_input label=“Search” wraptag=”“ /></code> spews out:
<code>
<form action=“http://example.org/” method=“get”>Search<br /><input type=“text” name=“q” value=”“ size=“15” /></form>
</code>
My questions are:
How can I remove <code><br /></code> from the output? (If possible, without hacking txp files)
And is it also possible to insert <code>id=“mysearchclass”</code> inside the <code>input</code> tag (without hacking any txp files)? I know it’s possible to wrap the whole thing up with a <code>div id=“mysearchclass”</code> but that seems to me as adding unnecessary divs to the code. :) Many thanks in advance.
Last edited by User61 (2005-10-11 19:43:09)
I was born intelligent, but education ruined me.
Offline
Re: Remove <br /> from <txp:search_input /> output
I’m not sure you’ll get anywhere without hacking. You can, however, do what I do, and ditch the txp:search
altogether:
<p>Search this bad boy:</p>
<form action="/index.php" method="get">
<fieldset id="searchme">
<input type="hidden" name="s" value="search" />
<input type="text" name="q" value="" size="15" />
<input type="submit" value="search" />
</fieldset>
</form>
You can output that from a form, leaving it easily editable sitewide.
Offline
#3 2005-10-11 21:16:45
- User61
- New Member
- From: Malaysia
- Registered: 2005-04-01
- Posts: 8
Re: Remove <br /> from <txp:search_input /> output
Thanks a million! Will try it out pronto. :)
I was born intelligent, but education ruined me.
Offline
#4 2005-10-11 21:29:18
- User61
- New Member
- From: Malaysia
- Registered: 2005-04-01
- Posts: 8
Re: Remove <br /> from <txp:search_input /> output
Hmm, I tried your code out but when I tried to search, it says <code>Unknown section search</code>.
I reckon it’s something to do with <code> /index.php </code> in the <code>form</code> tag. How do I fix this?
[EDIT] Problem solved after creating a “Search” section. Nothing regarding <code> /index.php </code> after all although I did change it to <code><txp:site_url /></code>.
Last edited by User61 (2005-10-12 05:30:49)
I was born intelligent, but education ruined me.
Offline