![]() |
|
custom search for pages in index.php - 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: custom search for pages in index.php (/thread-7516.html) |
custom search for pages in index.php - altert - 2010-08-22 Hello For my theme I want to print some pages tagged with specific tag on homepage. Is it possible to initiate search from inside the index.php? Thanks, custom search for pages in index.php - altert - 2010-08-22 After some digging in docs I was able to do it that way (specific tag here is "homepage") $searchobject = new SearchEngine(); $searchstring=Array("homepage"); $homepages=$searchobject->searchFieldsAndTags($searchstring, "zenpage_pages", "tags"); foreach($homepages as $homepage) {
` Thanks custom search for pages in index.php - acrylian - 2010-08-22 Looks good, but I am not sure you really need to use custom search for pages in index.php - altert - 2010-08-22 thanks! in fact I think for my purposes I don't even need to create page object custom search for pages in index.php - altert - 2012-07-01 Hello, Now that the method is protected and that solution stopped working, is there a way to generate a search inside some pages? Thanks, custom search for pages in index.php - acrylian - 2012-07-01 See the related_items plugin on the 1.4.3 beta for an example. |