{"id":21068916,"url":"https://github.com/brandcom/silverstripe-elemental-site-search","last_synced_at":"2025-05-16T03:33:45.389Z","repository":{"id":43012077,"uuid":"198580980","full_name":"brandcom/silverstripe-elemental-site-search","owner":"brandcom","description":"Basic site search for the SilverStripe Elemental module","archived":false,"fork":false,"pushed_at":"2024-04-19T11:36:38.000Z","size":22,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"5.x","last_synced_at":"2024-11-01T15:41:10.066Z","etag":null,"topics":["search","silverstripe","silverstripe-module"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brandcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-07-24T07:22:12.000Z","updated_at":"2024-03-11T11:20:54.000Z","dependencies_parsed_at":"2024-04-19T12:41:46.596Z","dependency_job_id":"2c75abcb-a18b-4bf0-ad99-5e239c263993","html_url":"https://github.com/brandcom/silverstripe-elemental-site-search","commit_stats":{"total_commits":15,"total_committers":4,"mean_commits":3.75,"dds":0.2666666666666667,"last_synced_commit":"7c9e581e70402183c170e0a01f58e5ee71e223cf"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandcom%2Fsilverstripe-elemental-site-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandcom%2Fsilverstripe-elemental-site-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandcom%2Fsilverstripe-elemental-site-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandcom%2Fsilverstripe-elemental-site-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brandcom","download_url":"https://codeload.github.com/brandcom/silverstripe-elemental-site-search/tar.gz/refs/heads/5.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225405192,"owners_count":17469301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["search","silverstripe","silverstripe-module"],"created_at":"2024-11-19T18:29:24.506Z","updated_at":"2024-11-19T18:29:25.081Z","avatar_url":"https://github.com/brandcom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SilverStripe Elemental Site Search Module\nBasic site search for the SilverStripe Elemental module. It works by saving a text reprentation of the elemental area to an extra field in SiteTree.\n\n\n## Requires\n\n* [SilverStripe](https://www.silverstripe.org/)\n* [SilverStripe Elemental](https://github.com/dnadesign/silverstripe-elemental)\n\n\n## Usage\n\n### Install this module with composer\n\n    composer require jbennecker/silverstripe-elemental-site-search\n\nMake sure you don't have `FulltextSearchable` enabled in `_config.php`.\n\n### Add the search form\n\nTo add the search form, add `$SearchForm` anywhere in your template.\n\nFor example in Header.ss\n\n    ...\n    \u003cdiv class=\"search-form\"\u003e\n        $SearchForm\n    \u003c/div\u003e\n    ...\n\n### Override the template\n\nLastly you can override the template for the result page.\n\napp/templates/Layout/Page_results.ss\n\n    \u003cdiv id=\"Content\" class=\"searchResults\"\u003e\n        \u003ch1\u003e$Title\u003c/h1\u003e\n\n        \u003c% if $Query %\u003e\n            \u003cp class=\"searchQuery\"\u003e\u003cstrong\u003eYou searched for \u0026quot;{$Query}\u0026quot;\u003c/strong\u003e\u003c/p\u003e\n        \u003c% end_if %\u003e\n\n        \u003c% if $Results %\u003e\n        \u003cul id=\"SearchResults\"\u003e\n            \u003c% loop $Results %\u003e\n            \u003cli\u003e\n                \u003ca class=\"searchResultHeader\" href=\"$Link\"\u003e\n                    \u003c% if $MenuTitle %\u003e\n                    $MenuTitle\n                    \u003c% else %\u003e\n                    $Title\n                    \u003c% end_if %\u003e\n                \u003c/a\u003e\n                \u003cp\u003e$Content.LimitWordCountXML\u003c/p\u003e\n                \u003ca class=\"readMoreLink\" href=\"$Link\"\n                    title=\"Read more about \u0026quot;{$Title}\u0026quot;\"\n                    \u003eRead more about \u0026quot;{$Title}\u0026quot;...\u003c/a\u003e\n            \u003c/li\u003e\n            \u003c% end_loop %\u003e\n        \u003c/ul\u003e\n        \u003c% else %\u003e\n        \u003cp\u003eSorry, your search query did not return any results.\u003c/p\u003e\n        \u003c% end_if %\u003e\n\n        \u003c% if $Results.MoreThanOnePage %\u003e\n        \u003cdiv id=\"PageNumbers\"\u003e\n            \u003c% if $Results.NotLastPage %\u003e\n            \u003ca class=\"next\" href=\"$Results.NextLink\" title=\"View the next page\"\u003eNext\u003c/a\u003e\n            \u003c% end_if %\u003e\n            \u003c% if $Results.NotFirstPage %\u003e\n            \u003ca class=\"prev\" href=\"$Results.PrevLink\" title=\"View the previous page\"\u003ePrev\u003c/a\u003e\n            \u003c% end_if %\u003e\n            \u003cspan\u003e\n                \u003c% loop $Results.Pages %\u003e\n                    \u003c% if $CurrentBool %\u003e\n                    $PageNum\n                    \u003c% else %\u003e\n                    \u003ca href=\"$Link\" title=\"View page number $PageNum\"\u003e$PageNum\u003c/a\u003e\n                    \u003c% end_if %\u003e\n                \u003c% end_loop %\u003e\n            \u003c/span\u003e\n            \u003cp\u003ePage $Results.CurrentPage of $Results.TotalPages\u003c/p\u003e\n        \u003c/div\u003e\n        \u003c% end_if %\u003e\n    \u003c/div\u003e\n\n### Clear caches\n\nThen finally add ?flush=1 to the URL and you should see the new template.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandcom%2Fsilverstripe-elemental-site-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandcom%2Fsilverstripe-elemental-site-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandcom%2Fsilverstripe-elemental-site-search/lists"}