{"id":23395797,"url":"https://github.com/netgen/toolbar","last_synced_at":"2026-01-28T07:06:54.098Z","repository":{"id":231116944,"uuid":"780955023","full_name":"netgen/toolbar","owner":"netgen","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-09T11:26:40.000Z","size":122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-24T15:44:50.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netgen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-02T13:31:34.000Z","updated_at":"2024-07-09T11:26:38.000Z","dependencies_parsed_at":"2024-04-02T14:57:18.638Z","dependency_job_id":"e1525b2d-ab35-43db-9795-77aed34ba4cc","html_url":"https://github.com/netgen/toolbar","commit_stats":null,"previous_names":["netgen/toolbar"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netgen%2Ftoolbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netgen%2Ftoolbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netgen%2Ftoolbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netgen%2Ftoolbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netgen","download_url":"https://codeload.github.com/netgen/toolbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243326654,"owners_count":20273519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-22T07:18:22.934Z","updated_at":"2026-01-28T07:06:49.031Z","avatar_url":"https://github.com/netgen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Installation\n\nTo add the Netgen Toolbar to your Symfony project, use Composer for easy installation. Run the following command:\n\n```bash\ncomposer require netgen/toolbar\n```\n\n## Usage\n\n### Configuration\n\nBy default, the toolbar uses the Ibexa admin siteaccess configured by the `%ngsite.admin_siteaccess_name%` parameter\navailable in Netgen Media Site. If you need some more control over the admin siteaccess which will be used, you can\nuse the configuration similar to the example below:\n\n```yaml\nnetgen_toolbar:\n    # Specifies the default admin siteaccess name, used when nothing else is configured\n    default_admin_site_access: my_admin\n\n    # Specifies the legacy siteaccess name, used when Toolbar detects the usage of Netgen Admin UI\n    legacy_admin_site_access: legacy_admin\n\n    # Specifies the map between siteaccesses/groups and admin siteaccess names to be used when current siteaccess\n    # matches one of the keys in this list. In this list, siteaccesses have priority over groups.\n    admin_site_access_mapping:\n        fh_eng: fh_admin\n        bold_eng: bold_admin\n        bold_group: bold_admin\n```\n\nAll of these configuration options are optional.\n\n### Integration into templates\n\nTo use the Netgen Toolbar in your project, include it in your pagelayout template, directly after the opening `\u003cbody\u003e` tag. Here is a basic example:\n\n```twig\n    {% include \"@NetgenToolbar/ngtoolbar.html.twig\" %}\n```\n\n### Adjusting for additional elements\n\nIf your layout includes elements like a sticky header that should be offset by the toolbar's height, you can specify additional CSS selectors. By default, only `#page` is adjusted. Here's how to include a sticky header in the offset calculation:\n\n```twig\n    {% include \"@NetgenToolbar/ngtoolbar.html.twig\" with {\n        offset_selectors: [\".site-header-sticky\", \"#page\"]\n    } %}\n```\n\nTo specify that no elements should be offset, pass an empty array:\n\n```twig\n    {% include \"@NetgenToolbar/ngtoolbar.html.twig\" with {\n        offset_selectors: []\n    } %}\n```\n\n## Custom adjustments using CSS\n\nFor additional custom adjustments, a CSS variable `--ngtoolbar-height` is provided and can be used throughout your project's CSS as needed.\n\n## How to mark elements that should be editable?\n\nEach component or block item that is supposed to be editable needs to have 2 data parameters with content ID and location ID and one unique data parameter that indicates if it's a component or a block item.\n\n```html\n\u003carticle data-item=\"true\" data-content-id=\"43\" data-location-id=\"23\"\u003e\n  \u003c!-- Your content here --\u003e\n\u003c/article\u003e\n```\n\nor\n\n```html\n\u003carticle data-component=\"true\" data-content-id=\"43\" data-location-id=\"23\"\u003e\n  \u003c!-- Your content here --\u003e\n\u003c/article\u003e\n```\n\n### Helper macro for data parameters\n\nThe bundle includes a helper macros for adding necessary data parameters to components and block items. First, import the macro into your template:\n\n```twig\n    {% import \"@NetgenToolbar/macros.html.twig\" as toolbar_macros %}\n```\n\nThen, use it as follows:\n\n#### Block item view types\n\n```twig\n    \u003carticle {{ toolbar_macros.item_params(content, location) }}\u003e\n        \u003c!-- Your content here --\u003e\n    \u003c/article\u003e\n```\n\nRendered HTML:\n\n```html\n\u003carticle data-item=\"true\" data-content-id=\"43\" data-location-id=\"23\"\u003e\n  \u003c!-- Your content here --\u003e\n\u003c/article\u003e\n```\n\n#### Components\n\n```twig\n    \u003cdiv {{ toolbar_macros.component_params(block) }}\u003e\n        \u003c!-- Your content here --\u003e\n    \u003c/div\u003e\n```\n\nRendered HTML:\n\n```html\n\u003carticle data-component=\"true\" data-content-id=\"43\" data-location-id=\"23\"\u003e\n  \u003c!-- Your content here --\u003e\n\u003c/article\u003e\n```\n\n## Visibility conditions\n\nThe toolbar is displayed only to authenticated users who have the `ngtoolbar/use` Ibexa policy, ensuring that only authorized users can access toolbar functionalities.\n\n## Building the project assets (for development purposes)\n\nThe Netgen Toolbar comes with its own set of assets. To build these assets for development or production environments, use the following commands:\n\n### For development\n\n```bash\n    pnpm run dev\n```\n\n### For production\n\n```bash\n    pnpm run prod\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetgen%2Ftoolbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetgen%2Ftoolbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetgen%2Ftoolbar/lists"}