PHP code example of werkbot / werkbot-search
1. Go to this page and download the library: Download werkbot/werkbot-search library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
werkbot / werkbot-search example snippets
/*
Get Index Query
Query used by search extension for indexing
*/
public function getIndexQuery(){
return "SELECT
concat(\"Page_\", SiteTree.ID) AS ID,
SiteTree.ClassName,
SiteTree.Title,
SiteTree.Content
FROM
Page
LEFT JOIN
SiteTree
ON
SiteTree.ID = Page.ID
WHERE
SiteTree.ShowInSearch = '1'";
}