Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
A predefine search
Hi at all.
I’m writing a multilanguage website and i need to search into a website only into defined section.
My website ha 5 section for each language, so i must search only in 5 section with the same language of search form.
There is a solution?
Offline
Re: A predefine search
With one section per language you could probably use section='<txp:section />'
attribute of <txp:search_input />
, in combination with <txp:if_section name='<txp:section />'>
in search_results form. With 5 sections it seems tricky without much code replication.
Last edited by etc (2012-06-29 10:49:06)
Offline
Re: A predefine search
Yes but in this case i can searh only in one section at time. I must search in 5 sections at time but not in 6.
Offline
Re: A predefine search
You could combine many
<txp:if_section name="en_1,en_2,...">
<txp:if_article_section name="en_1,en_2,...">
...
in search_form. But this is a bad solution anyway, since it breaks pagination.
I would use five categories instead of five sections, if possible, and put searchall="0"
in <txp:article />
.
Offline
Re: A predefine search
MarcoK wrote:
Hi at all.
I’m writing a multilanguage website and i need to search into a website only into defined section.
My website ha 5 section for each language, so i must search only in 5 section with the same language of search form.
There is a solution?
Hi Marco
I would go for one section/language and categories as it would make your search much easier.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Pages: 1