Comments (6)
Example implementation can be found here: sulu/ExampleNewsBundle#14
from sulu-docs.
Any updates on this?
Thank you
from sulu-docs.
No, there are no updates until now...
from sulu-docs.
Can you hint us on a sample implementation of a simple custom content type.
Or which classes, template and config files are required to get it done and how to correctly register it to the sulu cms system.
If I look at SingleInternalLink (choose it to avoid naming collisions when searching through the whole project). I can find the following files:
- vendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Content/Types/SingleInternalLink.php // Content type class that extens Sulu\Component\Content\SimpleContentType
- vendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Resources/public/js/components/single-internal-link/main.js // A class that handles some sulu admin form field behaviours, in this case the link selection. This is (seems to be) not necessarily required for any fieldtype, but probably useful in many "custom content type" use cases.
- vendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Resources/config/content_types.xml // This seems to be needed to register the content types
from sulu-docs.
There are 4 points you have to do.
- Create a tagged service (
sulu.content.type
) which implements theContentTypeInterface
or extendSimpleContentType
. - Create an aura-component which implements the UI for the
ContentType
(seevendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Resources/public/js/components/single-internal-link/main.js
) - Create a data-type (see
vendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Resources/public/js/validation/types/singleInternalLink.js
) - Create a template (see
vendor/sulu/sulu/src/Sulu/Bundle/ContentBundle/Resources/views/Template/content-types/single_internal_link.html.twig
) which starts the component.
from sulu-docs.
An example implementation for Sulu 2.0 is available in the sulu-demo repository: sulu/sulu-demo#66
from sulu-docs.
Related Issues (20)
- Subdomains in Sulu HOT 5
- Add documentation for image format attributes HOT 1
- Redesign Issue list HOT 2
- Discussion: Community Bundles in Doc HOT 4
- Create doc how to integrate a external user provider to create sulu admin user
- The function of the <cacheLifetime> Element is described wrong
- Link Type: enable_target looks like required but it's not HOT 1
- Missing docs for text_line content type
- Improve varnish configuration for user context based caching
- User Guide for Content Managers
- Add documentation for sulu_navigation_is_active Twig function HOT 4
- Missing SuluAdminBundle Documentation
- Support for automated translation tools
- Add example vhost for caddy webserver
- Add hint how fosjsrouting works
- Incorrect documentation on content type Location HOT 1
- Basic information about sitemap is missing
- Missing documentation Webspace Portal configuration - redirect
- Removal of the caution regarding template visibility in the template selection dropdown
- Missing documentation about FormVisitorInterface to extend/modify/overwrite Forms HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sulu-docs.