Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Layouts Ezplatform Tags Query Laravel Package

netgen/layouts-ezplatform-tags-query

Netgen Layouts eZ Platform Tags Query adds a custom query type for Netgen Layouts that lets you filter and display eZ Platform content by tags, making tag-based content listings easy to configure in your layouts.

View on GitHub
Deep Wiki
Context7

Getting Started

Reality check first: this is not a Laravel package. It's a Symfony bundle that plugs into Netgen Layouts running on eZ Platform / Ibexa with the Netgen Tags bundle (netgen/tagsbundle). There is no service provider, no config file to publish, and no Artisan surface. It registers a single Netgen Layouts query type whose job is: "give me content items that carry tag X", so you can use that query to populate a Layouts block.

Minimal steps:

  1. composer require netgen/layouts-ezplatform-tags-query (requires netgen/layouts-ezplatform, netgen/tagsbundle, and a compatible eZ/Ibexa kernel). Check the require block in vendor/netgen/layouts-ezplatform-tags-query/composer.json before you commit — this package tracks an older Layouts/eZ generation.
  2. Enable the bundle in config/bundles.php (Symfony Flex) — it ships as NetgenLayoutsEzPlatformTagsQueryBundle or similar.
  3. Clear the container: bin/console cache:clear.
  4. Look first at these three places:
    • vendor/netgen/layouts-ezplatform-tags-query/ — usually a handful of files: one query type class, one or two services.yaml/*_services.yml files, maybe an Ibexa/ vs Ez/ namespace split.
    • vendor/netgen/layouts-core/lib/Query/QueryType/ — the QueryTypeInterface it implements.
    • vendor/netgen/layouts-ezplatform/ — the content query type and item view wiring, which this package mirrors.
  5. First use case: in the Layouts admin, open a block → Add query → pick the tags query type → choose a tag (or tag subtree) → set an item view type → see the tagged content listed. That's the whole loop; everything else is parameters and caching.

Implementation Patterns

  • Tag-driven listing blocks. The canonical pattern: one block whose query is "content tagged with News", reused across the site. Keep the tag id in the query configuration, not in the template — the tag is a query parameter, the block layout controls presentation.
  • Dynamic tags from the current page. The high-value pattern is related content: a block on an article page that lists other items sharing a tag. Implement it with a query-type parameter (e.g. tag) plus a parameter provider that resolves the tag from the currently displayed content, rather than hard-coding a tag id. This is where the package earns its keep — without it you'd hand-roll a custom query type.
  • Tag subtree queries. Tags in Netgen Tags live in a tree (parent_id). Decide up front whether editors should pick a leaf tag or a branch; if branch, the query must walk descendants (Tag::getSubtree() or the equivalent repository method), otherwise you get a silent empty result when someone tags with a child.
  • Compose, don't overload. Layouts blocks are cheap to stack. Two blocks ("latest tagged", "all tagged") with different limit/offset beat adding sort-and-filter parameters to a query type you'll then have to maintain.
  • Cache invalidation hooks. Wire Layouts' cache clearing to tag events (TagsBundle dispatches events on tag assignment/removal). Content-level invalidation from layouts-ezplatform will not necessarily fire when only a tag relation changes — see below.
  • Overriding for project needs. Add sort, exclude_tag, or content_types parameters by decorating the query type service in your own services.yaml rather than forking the bundle. The class is small; a decorator is usually cleaner than a fork.

Gotchas and Tips

  • GPL-2.0. Fine for server-side use on your own project; a problem if you redistribute a proprietary product that links it. Same applies to the rest of the Netgen stack, but call it out in the licence review.
  • Thin bridge, low activity. 6 stars, 0 dependents. This is a ~200-line bridge between two other packages, not a library. Budget for the possibility that you vendor it into src/ when the next Layouts/eZ upgrade breaks the constraint.
  • Empty results are almost always the tag id. Query by id, not keyword. Verify against the eztags table (id, parent_id, remote_id) — a wrong id or a parent tag with no tagged descendants returns zero rows with no error.
  • Language. Tag keywords are per-language, tag ids are not. A query that resolves a tag by keyword will behave differently on a multilingual site than one resolving by id; be explicit.
  • Caching lies to you while debugging. Layouts caches rendered blocks and query results. If you change tags on content and see nothing, clear both the Symfony cache and the Layouts cache (admin "clear cache", or your project's cache-clear command) before you start debugging code.
  • Item view type must exist. The query type declares an item view type (e.g. standard, line). If no matching item view is configured for the content type on the eZ side, items silently don't render or fall back to an unexpected template.
  • Version drift is the main risk. Confirm the package's require: netgen/layouts-ezplatform and netgen/tagsbundle majors, and whether it targets the Ez (eZ Platform) or Ibexa namespace. Mixing a pre-Ibexa bundle into an Ibexa 4 kernel will fail at container compile time with an unhelpful "class not found" in a service definition — read services.yaml in the bundle when that happens.
  • Debugging tip: dump the compiled query type list with bin/console debug:container --tag=netgen_layouts.query_type (tag name varies by version) to confirm the bundle actually registered itself before you suspect your query configuration.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
laravel2580/idehelpers
delatbabel/viewpages
anavel/gettext
muhamadrezaar/highcharts
delatbabel/keylists
frankkessler/salesforce-laravel-oauth2-rest
anavel/foundation
wdmtech/enviricons
eii/laravel-captcha
muka/shape-reader
tdt/json
refinery29/php-cs-fixer-config
hotmeteor/eco-env
mvaliolahi/hydrate
wearede/tbcpay-php
parsnick/steak
thibaud-dauce/mattermost-php
multilinguals/apollo-client
antaresbr/collection
kr0lik/phpstan-rules