D
D
del9937882016-11-09 18:55:57
DLE
del993788, 2016-11-09 18:55:57

How to redirect to the search page when searching?

Hello. The situation is this:
When I am in the category "Watermelon" and I look at articles in this category, and if I want to search the entire site, then by entering the search word in the search bar and clicking on the "find" button, the page will refresh and I will see the search result .
But the problem is, I'll still be in the Watermelon category. That is, the address bar will say dle.local/arbuz .
If dle finds a lot of the articles I'm looking for, then I will have a pagination of the page, and if I click on page 2, the page will refresh and the address in the browser line will change to dle.local/index.php?do=search .
Tell me how to make it so that when I search, I immediately find myself on the do=search page?
What for? I have my category "Watermelon" styled and rendered content [category=3]{content}[/category], so when I get search results, I get some ugly content overlay.
A little more...
I'll describe the situation a little more in detail. Now my code looks like this:
[category=6-41]{content}[/category]
[available=search]{content}[/available]
But when I click "find" in my search results, the results are duplicated. 2 for each article. It doesn't make much sense though, because I'm still in the category... However, if I click on the "2" page, the duplication stops, since I've already gone to index.php?do=search . I have a feeling this is a bug.
I tried not-category too... but dle doesn't care... and I guess why. The above code is in the cat.tpl file, and main.tpl shows [not-category=1-4][available=cat|showfull|search]{include file="cat.tpl"}[/available ][/not-category] probably too much for available...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question