Download the PHP package youngdogs/magento2-cms-search without Composer
On this page you can find all versions of the php package youngdogs/magento2-cms-search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download youngdogs/magento2-cms-search
More information about youngdogs/magento2-cms-search
Files in youngdogs/magento2-cms-search
Package magento2-cms-search
Short Description Adds flexible GraphQL search for CMS pages and CMS blocks (search by content, title, content_heading, and more, with word and exact-phrase matching).
License MIT
Informations about the package magento2-cms-search
YoungDogs_CmsSearch
Adds flexible GraphQL search for Magento 2 CMS pages and CMS blocks.
Out of the box, Magento only lets you fetch a CMS page by its exact identifier, or CMS blocks by an
exact list of identifiers. This module adds two additional queries, cmsPageSearch and
cmsBlockSearch, that let you search by content, title, and other fields — with exact match,
word/phrase search, or "in list" filtering.
Requirements
- PHP 8.2 - 8.5
- Magento 2.4.6+
Magento_Cms,Magento_Store,Magento_GraphQl(installed by default with Magento)
Installation
Configuration
Stores > Configuration > YOUNG-DOGS > CMS Search
The section is protected by the Stores > Configuration > CMS Search ACL permission.
| Field | Description |
|---|---|
| Enable module | Yes/No, defaults to Yes. When disabled, both queries return a GraphQL input error. |
| Maximum Page Size | Hard upper limit applied to pageSize, regardless of what the client requests. |
Only active pages/blocks belonging to the current store view are returned.
GraphQL usage
Search CMS pages
Search CMS blocks
Filterable fields
| Query | Fields |
|---|---|
cmsPageSearch |
identifier, title, content, content_heading, meta_title, meta_description, meta_keywords |
cmsBlockSearch |
identifier, title, content |
Each field accepts a CmsSearchFilterTypeInput:
| Condition | Behavior |
|---|---|
eq |
Exact match. |
in |
Matches any value in the given array. |
match |
Search-engine style: "quoted phrases" are matched literally; remaining words are split on whitespace and combined with AND. Case-insensitive substring match. |
Multiple fields in the same filter object are combined with AND.
Plain-text content
Both cmsPageSearch and cmsBlockSearch items expose a content_text field alongside content: the same
content with HTML tags, <script>/<style> blocks, and entities stripped/decoded, leaving plain readable
text. Useful when passing results to an AI agent that shouldn't have to parse markup.
Sorting
sort: { field: TITLE | IDENTIFIER, direction: ASC | DESC } (defaults to title ASC).
Limitations
matchperforms aLIKE-based substring search (no fulltext/relevance engine dependency required). For very large CMS catalogs, consider indexingcontentexternally (e.g. Elasticsearch/OpenSearch) if search performance becomes a concern.- Only active pages/blocks are searchable; there is no admin/preview mode for inactive content.
License
MIT — see LICENSE.
All versions of magento2-cms-search with dependencies
magento/module-cms Version >=104.0 <107
magento/module-store Version >=101.1 <103
magento/module-graph-ql Version >=100.4 <102