Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 Yesterday 14:39:30
- astick360
- Member
- Registered: 2022-05-05
- Posts: 24
Search only in the running section and only visible articles
I need information on how to limit search engine search only to articles on visible status and only for the running section. In the code I have a section given as a relative, and I would like to universally to check the system how the consuming is and searched for it only.
I will add the search engine as a form in different sections but it is always to be limited to articles in a given section, so I can not give relative values.
Offline
Re: Search only in the running section and only visible articles
astick360 wrote #338873:
I need information on how to limit search engine search only to articles on visible status and only for the running section. In the code I have a section given as a relative, and I would like to universally to check the system how the consuming is and searched for it only.
I will add the search engine as a form in different sections but it is always to be limited to articles in a given section, so I can not give relative values.
Not sure about how to limit search to a section, although the idea cropped up before without any solution. The search only returnes live articles on the front end, unless you specifically use the searchsticky
attribute.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Search only in the running section and only visible articles
Hi, in addition to what colak mentioned, you can use the attribute searchall="0"
in your txp:article tag to restrict the search results to the current section. Your search results need to be output in that section, of course. See the txp:article docs for information on both tag attributes.
TXP Builders – finely-crafted code, design and txp
Offline