nestordedios / bolt-searchable-content-extension

0 stars 0 forks source link

Bolt Searchable Content Extension

An easy to use extension to search for Repeaters and Blocks fields content.

Configuration

We add a textarea field to the Contenttype we want its Repetears or Blocks content to be searchable in the contenttypes.yml

pages:
    name: Pages
    singular_name: Page
    fields:
        ...
        myrepeater:
            type: repeater
            fields:
                title_text:
                    type: text
                body_text:
                    type: html
                description_text:
                    type: html
        myblock:
            type: block
            label: My Blocks
            fields:
                myblocktext:
                    label: Text block
                    fields:
                        title:
                            type: text
                        description:
                            type: html
                        more_text:
                            type: html
                            height: 70px
                myblockbody:
                    label: Paragraph
                    fields:
                        heading:
                            type: text
                        content:
                            type: html
                            height: 100px
        search:
                label: Searchable content
                postfix: "<p>Extra index for the website search engine. This is automatically overwritten.</p>"
                type: textarea
                height: 300px
        ...

We add the Repeaters or Blocks fields to our extension's config file searchablecontent.twokings.yml. This needs to match the following format: