{"id":17295689,"url":"https://github.com/sherlockode/advanced-content-bundle","last_synced_at":"2025-04-14T11:30:51.373Z","repository":{"id":32751128,"uuid":"116158194","full_name":"sherlockode/advanced-content-bundle","owner":"sherlockode","description":"Symfony Bundle for CMS content with custom fields","archived":false,"fork":false,"pushed_at":"2025-02-12T14:05:33.000Z","size":1073,"stargazers_count":9,"open_issues_count":4,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T00:44:00.384Z","etag":null,"topics":["cms","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sherlockode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-01-03T16:26:38.000Z","updated_at":"2025-03-02T16:08:25.000Z","dependencies_parsed_at":"2023-09-27T13:52:57.913Z","dependency_job_id":"64f791de-1fa7-401c-bb24-01001d681ae2","html_url":"https://github.com/sherlockode/advanced-content-bundle","commit_stats":{"total_commits":325,"total_committers":7,"mean_commits":46.42857142857143,"dds":0.4,"last_synced_commit":"5883d71527d19da04d2892ed0579be736e7b6543"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherlockode%2Fadvanced-content-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherlockode%2Fadvanced-content-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherlockode%2Fadvanced-content-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherlockode%2Fadvanced-content-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sherlockode","download_url":"https://codeload.github.com/sherlockode/advanced-content-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809059,"owners_count":21164896,"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":["cms","php","symfony","symfony-bundle"],"created_at":"2024-10-15T11:10:57.198Z","updated_at":"2025-04-14T11:30:51.349Z","avatar_url":"https://github.com/sherlockode.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sherlockode AdvancedContentBundle\n\n----\n\n[ ![](https://img.shields.io/packagist/l/sherlockode/advanced-content-bundle)](https://packagist.org/packages/sherlockode/advanced-content-bundle \"License\")\n[ ![](https://img.shields.io/packagist/v/sherlockode/advanced-content-bundle)](https://packagist.org/packages/sherlockode/advanced-content-bundle \"Version\")\n[ ![](https://poser.pugx.org/sherlockode/advanced-content-bundle/downloads)](https://packagist.org/packages/sherlockode/advanced-content-bundle \"Total Downloads\")\n[ ![Support](https://img.shields.io/badge/support-contact%20author-blue])](https://www.sherlockode.fr/contactez-nous/?utm_source=github\u0026utm_medium=referral\u0026utm_campaign=plugins_acb)\n\n![image](https://user-images.githubusercontent.com/22291441/230099691-0fad8407-9883-4f0c-bdbd-9d6a8245a8db.png)\n\n## Table of Content\n\n---- \n\n* [Overview](#overview)\n* [Installation](#installation)\n* [Terminology](#terminology)\n* [Configuration](#configuration)\n    * [Assets](#assets)\n    * [Twig](#twig)\n    * [Entities](#entities)\n    * [Upload](#upload-configuration)\n    * [Routing](#routing)\n* [Advanced documentation](#advanced-documentation)\n* [Dependencies](#dependencies)\n* [License](#license)\n* [Contact](#contact)\n\n# Overview \n\n---- \n\nThis bundle provides advanced CMS features for end user contribution.\n\nUsers can build their website pages quickly and effortlessly thanks to our intuitive interface.\nSeveral standard elements are included, such as text block, heading, image, image carousel, video player, ...\nResponsive layouts can be shaped as needed with row and column elements.\nDrafts are saved automatically and it's easy to rollback to a previous version.\nCustom elements can be added simply with a few lines of code.\n\n# Installation\n\n----\n\n## Get the bundle using composer\n\nThe best way to install this bundle is to rely on [Composer](https://getcomposer.org/):\n\n```bash\n$ composer require sherlockode/advanced-content-bundle\n```\n\n## Enable the bundle\n\nRegister the bundle in your application's kernel:\n\n```php\n// config/bundles.php\n\u003c?php\n\nreturn [\n    /* ... */\n    Sherlockode\\AdvancedContentBundle\\SherlockodeAdvancedContentBundle::class =\u003e ['all' =\u003e true],\n];\n\n```\n\n# Terminology\n\n----\n\n## Entities\n\n----\n\nA Page is linked to a PageMeta and to a Content.\\\nIt can optionally be linked to a PageType too.\n\nContent can be used independently as well.\\\nFor example, if several Pages include the same layer, you can create a single Content with this layer and then include the Content within the Pages.\\\nAs a result, if the layer has to change, you only have to change a single Content instead of all the Pages.\n\nYou can also create a Content to make some parts of your website dynamic.\\\nFor example, you can create a Content which includes your footer links. This way you don't have to change your template everytime the footer has to be updated.\n\nPages, PageMetas and Contents are all versionable, hence the PageVersion, PageMetaVersion and ContentVersion entities.\n\nFinally, if you enabled the scope management, you will be able to associate each Page and Content to one or multiple Scopes.\n\n## Elements\n\n----\n\nContent data is an array of Elements.\\\nElements can either be a Layout or a FieldType.\\\nLayouts include rows and columns.\\\nFieldTypes include the field types we defined (text, image, video, ...) and you custom field types.\n\n# Configuration\n\n----\n\n## Assets\n\n----\n\njQuery and jQuery UI are mandatory and should be required in `package.json` in order for the assets build to work.\n\nPlease note that Font Awesome is optional, but natively used for icons display on contribution pages.\nTo use it you should require `@fortawesome/fontawesome-free` in `package.json` (or use another install method of your choice).\n\n```json\n{\n  \"dependencies\": {\n    \"@fortawesome/fontawesome-free\": \"^6.1.2\",\n    \"jquery\": \"^3.5.0\",\n    \"jquery-ui\": \"1.12.1\"\n  }\n}\n```\n\nYou should import the provided assets in your main asset file to integrate them in your asset build process.\n\n\n```js\n// assets/js/app.js\nimport '../../vendor/sherlockode/advanced-content-bundle/Resources/public/css/index.scss';\nimport '../../vendor/sherlockode/advanced-content-bundle/Resources/js/index.js';\n\n// font awesome (optional)\nimport '@fortawesome/fontawesome-free/css/fontawesome.css';\nimport '@fortawesome/fontawesome-free/css/solid.css';\n```\n\nYou can use the provided `layout.html.twig` or build your own depending on your needs.\nThe `symfony/webpack-encore-bundle` is required in order to use this layout with the Webpack Encore Twig functions.\n\n```\ncomposer require symfony/webpack-encore-bundle\n```\n\n```html\n{# templates/layout.html.twig #}\n\n{# ... #}\n{{ encore_entry_link_tags('app') }}\n{# ... #}\n{{ encore_entry_script_tags('app') }}\n```\n\n## Twig\n\n----\n\nThe bundle automatically uses Bootstrap 5 (or Bootstrap 4 for Symfony \u003c 5.3) as the base form theme for all forms.\n\nIf you just want to use a different form theme,\nyou can override the bundle's base form theme file `Form/base_theme.html.twig`\n\n```\n{# templates/bundles/SherlockodeAdvancedContentBundle/Form/base_theme.html.twig #}\n\n{% extends 'form_div_layout.html.twig' %}\n```\n\n## Entities\n\n----\n\n`SherlockodeAdvancedContentBundle` provides 8 entity models.\nTo be able to use them, you need to create your own entities, see examples in the [doc](Resources/doc/entities.md),\nand fill the corresponding configuration :\n\n```yaml\n# config/packages/sherlockode_advanced_content.yaml\nsherlockode_advanced_content:\n    entity_class:\n        content: App\\Entity\\Content\n        content_version: App\\Entity\\ContentVersion\n        page: App\\Entity\\Page\n        page_meta: App\\Entity\\PageMeta\n        page_meta_version: App\\Entity\\PageMetaVersion\n        page_type: App\\Entity\\PageType\n        page_version: App\\Entity\\PageVersion\n        scope: App\\Entity\\Scope\n```\n\n\n## Upload configuration\n\n----\n\nIf you want to use the `Image` or `File` field type, you need to configure the directory in which the images will be saved.\n\nIf not defined, all images will be saved in the system's temporary directory.\n\nThe `uri_prefix` is used to retrieve the image on display.\nThe resulting image URL will be the URI prefix with the uploaded file name appended.\n\n```yaml\n# config/packages/sherlockode_advanced_content.yml\nsherlockode_advanced_content:\n    upload:\n        image_directory: '%kernel.project_dir%/public/uploads/acb_images'\n        uri_prefix: /uploads/acb_images\n```\n\nThe bundle use namers to name uploaded files. A namer is a simple class which implements \n`Sherlockode\\AdvancedContentBundle\\Naming\\NamerInterface`.\n\nThe built-in namers are:\n- `Sherlockode\\AdvancedContentBundle\\Naming\\UniqueNamer`: use a combination of md5 / uniqueid to try \nto make the filename unique. This is the default namer. His service is \n`sherlockode_advanced_content.unique_file_namer`;\n- `Sherlockode\\AdvancedContentBundle\\Naming\\ClientOriginalNamer`: keep the original file name.\nHis service ID is `̀sherlockode_advanced_content.client_original_file_namer`\n\nYou can change the namer through the configuration:\n\n```yaml\n# config/packages/sherlockode_advanced_content.yml\nsherlockode_advanced_content:\n    upload:\n        image_directory: '%kernel.project_dir%/public/uploads/acb_images'\n        uri_prefix: /uploads/acb_images\n        file_namer: sherlockode_advanced_content.client_original_file_namer\n```\n\n## Routing\n\n----\n\nThe routing is split into several files for better import rules.\n\n* content.xml : Utility routes for editing contents\n* content_crud.xml : basic CRUD routes for Content (demo purpose)\n* page.xml : Utility routes for editing pages\n* page_crud.xml : basic CRUD routes for Pages (demo purpose)\n* scope_crud.xml : basic CRUD routes for Scopes (demo purpose)\n* tools.xml : Routes for tooling pages, like import/export, Page Type CRUD\n* all.xml : includes all the above\n* base.xml : includes tools.xml, content.xml and page.xml\n\nThe base.xml file is sufficient if you plan to manage all your CRUD operations in custom controllers\n(like if you use an external admin system).\n\n```yaml\n# config/routes.yaml\nsherlockode_advanced_content:\n    prefix: '/acb'\n    resource: '@SherlockodeAdvancedContentBundle/Resources/config/routing/base.xml'\n    # or include all routes directly\n    # resource: '@SherlockodeAdvancedContentBundle/Resources/config/routing/all.xml'\n```\n\n# Advanced Documentation\n\n----\n\n- [Entities](Resources/doc/entities.md)\n- [Elements](Resources/doc/elements.md)\n- [Tools](Resources/doc/tools.md)\n- [Import](Resources/doc/import.md)\n- [Export](Resources/doc/export.md)\n- [Usage](Resources/doc/usage.md)\n- [Data migration](Resources/doc/data_migration.md)\n\n\n# Dependencies\n\n----\n\nThis bundle is compatible with webpack.\njQuery library is mandatory.\njQuery ui sortable is advised but not required.\nSome field types, such as the image carousel, use Bootstrap 5 for their display. \n\n\n# License\n\n----\n\nThis bundle is under the MIT license. Check the details in the [dedicated file](LICENSE)\n\n\n# Contact\n\n----\n\nIf you want to contact us, the best way is to fill the form on [our website](https://www.sherlockode.fr/contactez-nous/?utm_source=github\u0026utm_medium=referral\u0026utm_campaign=plugins_acb) or send us an e-mail to contact@sherlockode.fr with your question(s). We guarantee that we answer as soon as we can!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherlockode%2Fadvanced-content-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsherlockode%2Fadvanced-content-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherlockode%2Fadvanced-content-bundle/lists"}