Additional control-panel that allow users to search which contents using a specific block
Project description
collective.searchblocks
A comprehensive Plone add-on that provides search functionality for content using specific blocks.
Features ✨
- Block Search Endpoint: RESTful API endpoint (
/@search-blocks) for searching content by block types - Security: Permission-based access control for the search API
- Catalog Integration: Uses Plone's catalog for efficient searching
- Metadata Support: Returns rich metadata including title, type, review state, creation and modification dates
- Pagination: Support for batched results with configurable page sizes
- Sorting: Results sorted by title for consistent ordering
Installation
Install collective.searchblocks with uv.
uv add collective.searchblocks
Create the Plone site.
make create-site
REST API
@search-blocks
Search for content using specific blocks.
GET /@search-blocks
Returns a list of all available block types in the catalog.
Response:
{
"block_types": ["slider", "hero", "text"]
}
GET /@search-blocks?block_types=slider
Returns content items that have the specified block type, formatted using the standard summary serializer.
Response:
{
"block_types": ["slider", "hero", "text"],
"items": [
{
"@id": "http://localhost:8080/Plone/doc-1",
"@type": "Document",
"title": "Doc 1",
"description": "...",
"review_state": "published"
}
],
"items_total": 1
}
Parameters:
block_types(string): The block type to search for.b_size(int): Batch size (pagination).b_start(int): Batch start index (pagination).sort_on(string, automatic): Sorts results bysortable_title(automatically added).metadata_fields(list, automatic): Includesmodifiedandcreatedmetadata fields (automatically added).
Contribute
Prerequisites ✅
- An operating system that runs all the requirements mentioned.
- uv
- Make
- Git
- Docker (optional)
Installation 🔧
-
Clone this repository.
git clone git@github.com:collective/collective-searchblocks.git cd collective-searchblocks/backend
-
Install this code base.
make install
Add features using plonecli or bobtemplates.plone
This package provides markers as strings (<!-- extra stuff goes here -->) that are compatible with plonecli and bobtemplates.plone.
These markers act as hooks to add all kinds of features through subtemplates, including behaviors, control panels, upgrade steps, or other subtemplates from bobtemplates.plone.
plonecli is a command line client for bobtemplates.plone, adding autocompletion and other features.
To add a feature as a subtemplate to your package, use the following command pattern.
make add <template_name>
For example, you can add a content type to your package with the following command.
make add content_type
You can add a behavior with the following command.
make add behavior
You can check the list of available subtemplates in the [`bobtemplates.plone` `README.md` file](https://github.com/plone/bobtemplates.plone/?tab=readme-ov-file#provided-subtemplates).
See also the documentation of [Mockup and Patternslib](https://6.docs.plone.org/classic-ui/mockup.html) for how to build the UI toolkit for Classic UI.
License
The project is licensed under GPLv2.
Credits and acknowledgements 🙏
Generated from the cookieplone-templates template on 2026-01-14 14:29:54.. A special thanks to all contributors and supporters!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file collective_searchblocks-0.2.1.tar.gz.
File metadata
- Download URL: collective_searchblocks-0.2.1.tar.gz
- Upload date:
- Size: 76.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5c026cca4017ee2de70c57e996f1ed1d4e2dfe0e42680da33d0460de2b7edda
|
|
| MD5 |
cdc95f01dc6af81525ef4e594642b3fc
|
|
| BLAKE2b-256 |
031ed85397a439e3d43fabd7590ec6119be7cc4ac44ca429dad9595383e3a7b2
|
File details
Details for the file collective_searchblocks-0.2.1-py3-none-any.whl.
File metadata
- Download URL: collective_searchblocks-0.2.1-py3-none-any.whl
- Upload date:
- Size: 84.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c55bbe4244937f68f28b18120303930494e6aae51c336bf83ff1ae40bc44af5
|
|
| MD5 |
43d67a0196b375fb4178a77c4a540256
|
|
| BLAKE2b-256 |
65954682480ec5650067861a49b33f6b24bbaf1564a64542771e388a8f32e9cf
|