![]() |
|
Seperate search for pages/news and images - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Seperate search for pages/news and images (/thread-7619.html) |
Seperate search for pages/news and images - jackdaw - 2010-09-16 For a site I now have a blog section and a gallery section. In the sidebar I have the searchform. What I would like is for the searchform to display only searchresults from pages/news when done from within the blog section, and only images when done from within the gallery section. Therefore (I guess), I could split the search.php template up into searchalbums.php and searchnews.php, but maybe there's an easier way? Seperate search for pages/news and images - acrylian - 2010-09-16 This is how I would try it with one search page. There are options for images, albums, news and pages to be searched. As with all options you can temporarily or permanently set them to something else. These are the option names for the four search items: You would have to temporarily set this on the page type you have the search page and then probably have to make a custom searchform that appends a GET or POST statement so that the search page "knows" (as temporatily set options vanish on the search page naturally) that it has to set the options as well. Or you could check from what page you came using the HTTP referrer maybe. Or you set the options permanently and reset them on the search page after the results (of course then the search there would be for all types again). Sounds like a good idea to have this as a parameter for the search form (you can already limit search to one or more specific album btw). Please open a ticket as well. Splitting would be an easy way but you would need custom search forms as well. Seperate search for pages/news and images - jackdaw - 2010-09-17 As a parameter it would be easier but for now I will try you suggestions. Thanks. Seperate search for pages/news and images - acrylian - 2010-09-17 Probably 1.3.2 will have an easier way for this (might require theme changes though). |