-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Remove default plugin creation #6468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
czpython
merged 4 commits into
django-cms:release/4.0.x
from
chaosk:feature/remove-default-plugin-creation
Aug 6, 2018
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove default_plugins from the docs
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,14 +197,6 @@ Example:: | |
'extra_context': {"width":640}, | ||
'name': gettext("Content"), | ||
'language_fallback': True, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this |
||
'default_plugins': [ | ||
{ | ||
'plugin_type': 'TextPlugin', | ||
'values': { | ||
'body':'<p>Lorem ipsum dolor sit amet...</p>', | ||
}, | ||
}, | ||
], | ||
'child_classes': { | ||
'TextPlugin': ['PicturePlugin', 'LinkPlugin'], | ||
}, | ||
|
@@ -293,71 +285,6 @@ matches; if the same configuration is retrieved for the ``content`` placeholder | |
it falls back to the fallback languages as specified in :setting:`CMS_LANGUAGES`. | ||
Defaults to ``True`` since version 3.1. | ||
|
||
.. _placeholder_default_plugins: | ||
|
||
``default_plugins`` | ||
You can specify the list of default plugins which will be automatically | ||
added when the placeholder will be created (or rendered). | ||
Each element of the list is a dictionary with following keys : | ||
|
||
``plugin_type`` | ||
The plugin type to add to the placeholder | ||
Example : ``TextPlugin`` | ||
|
||
``values`` | ||
Dictionary to use for the plugin creation. | ||
It depends on the ``plugin_type``. See the documentation of each | ||
plugin type to see which parameters are required and available. | ||
Example for a text plugin: | ||
``{'body':'<p>Lorem ipsum</p>'}`` | ||
Example for a link plugin: | ||
``{'name':'Django-CMS','url':'https://www.django-cms.org'}`` | ||
|
||
``children`` | ||
It is a list of dictionaries to configure default plugins | ||
to add as children for the current plugin (it must accepts children). | ||
Each dictionary accepts same args than dictionaries of | ||
``default_plugins`` : ``plugin_type``, ``values``, ``children`` | ||
(yes, it is recursive). | ||
|
||
Complete example of default_plugins usage:: | ||
|
||
CMS_PLACEHOLDER_CONF = { | ||
'content': { | ||
'name' : _('Content'), | ||
'plugins': ['TextPlugin', 'LinkPlugin'], | ||
'default_plugins':[ | ||
{ | ||
'plugin_type':'TextPlugin', | ||
'values':{ | ||
'body':'<p>Great websites : %(_tag_child_1)s and %(_tag_child_2)s</p>' | ||
}, | ||
'children':[ | ||
{ | ||
'plugin_type':'LinkPlugin', | ||
'values':{ | ||
'name':'django', | ||
'url':'https://www.djangoproject.com/' | ||
}, | ||
}, | ||
{ | ||
'plugin_type':'LinkPlugin', | ||
'values':{ | ||
'name':'django-cms', | ||
'url':'https://www.django-cms.org' | ||
}, | ||
# If using LinkPlugin from djangocms-link which | ||
# accepts children, you could add some grandchildren : | ||
# 'children' : [ | ||
# ... | ||
# ] | ||
}, | ||
] | ||
}, | ||
] | ||
} | ||
} | ||
|
||
``plugin_modules`` | ||
A dictionary of plugins and custom module names to group plugin in the | ||
toolbar UI. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
language_fallback
was removed