eZPlatform Group Search Bundle

UNIX name Owner Status
ezplatform-group-search-bundle 7x stable
Version Compatible with
N/A N/A
This bundle contains a base implementation of user search in multiple groups.

ContextualCode\GroupSearchBundle

This bundle contains a base implementation of user search in multiple groups.

Prerequisite

Be aware that this package overrides default eZ Platform Solr services to support highlights.
If you have these classes override in your project, make sure you have this

```yaml
ezpublish.search.solr.gateway.native.class: ContextualCode\GroupSearchBundle\eZ\Solr\Gateway\Native
ezpublish.search.solr.result_extractor.native.class: ContextualCode\GroupSearchBundle\eZ\Solr\NativeResultExtractor
```

Installation

  1. Include this bundle in your composer.json:

    {
    "require": {
    "contextualcode/ezplatform-group-search-bundle": "dev-master"
    },
    "repositories": [
    {
    "type": "vcs",
    "url": "[email protected]:contextualcode/ezplatform-group-search-bundle.git"
    }
    ]
    }
  2. Run composer update contextualcode/ezplatform-group-search-bundle
  3. Enable this bundle in app/AppKernel.php:


    public function registerBundles()
    {
    $bundles = [
    ...,
    new ContextualCode\GroupSearchBundle\ContextualCodeGroupSearchBundle(),
    ];
    }
  4. Make sure to add these lines to app/config/routing.yml:

    group_search_routes:
    resource: "@ContextualCodeGroupSearchBundle/Resources/config/routing.yml"
  5. (optional) To use JS part from the package, register entrypoint in webpack.config.js:

    Encore.addEntry('group_search', './vendor/contextualcode/ezplatform-group-search-bundle/src/ContextualCode/GroupSearchBundle/Resources/public/standard/group-search.js');

    Then Run encore:

    yarn encore [dev|prod]

    And include in template:

    {{ encore_entry_script_tags('group_search') }}
  6. (optional) Define ezsettings.default.contextualcode.group_search.groups_definition parameter.
    Default configuration:

    ezsettings.default.contextualcode.group_search.groups_definition:
    general:
    title: Search Results
    no_results_message: '
  7. No related pages found for {term}
  8. '
    exclude_content_types: ['image', 'user', 'user_group']
    max_count: 25
    parent_location_path: /1/2/
    images:
    title: Images
    no_results_message: '
  9. No Images found for {term}
  10. '
    include_content_types: ['image']
    max_count: 10
    parent_location_path: /1/43/
  11. In template, render search input block. For example:


  12. Done!

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.