Skip to content
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

Please explain settings in CMS_PLACEHOLDER_CONF #830

Open
greyhare opened this issue Sep 21, 2020 · 1 comment
Open

Please explain settings in CMS_PLACEHOLDER_CONF #830

greyhare opened this issue Sep 21, 2020 · 1 comment

Comments

@greyhare
Copy link

I was wondering why I didn't see most of the placeholders I'm used to seeing in the menu in Django CMS when I clicked + for Main Content. After some digging, I founf it's restricted by CMS_PLACEHOLDER_CONF (which defaults to {} for Django CMS Installer-generated projects). My Shop project is from the shop cookie cutter.

If it's not too much trouble, could someone add a short explanation in 19.2.2. Django-CMS and Cascade settings as to why the default is:

CMS_PLACEHOLDER_CONF = {
    'Breadcrumb': {
        'plugins': ['BreadcrumbPlugin'],
        'parent_classes': {'BreadcrumbPlugin': None},
    },
    'Commodity Details': {
        'plugins': ['BootstrapContainerPlugin', 'BootstrapJumbotronPlugin'],
        'parent_classes': {
            'BootstrapContainerPlugin': None,
            'BootstrapJumbotronPlugin': None,
        },
    },
    'Main Content': {
        'plugins': ['BootstrapContainerPlugin', 'BootstrapJumbotronPlugin'],
        'parent_classes': {
            'BootstrapContainerPlugin': None,
            'BootstrapJumbotronPlugin': None,
            'TextLinkPlugin': ['TextPlugin', 'AcceptConditionPlugin'],
        },
    },
    'Static Footer': {
        'plugins': ['BootstrapContainerPlugin', 'BootstrapJumbotronPlugin'],
        'parent_classes': {
            'BootstrapContainerPlugin': None,
            'BootstrapJumbotronPlugin': None,
        },
    },
}

and why the docs show something else:

CMS_PLACEHOLDER_CONF = {
    'Breadcrumb': {
        'plugins': ['BreadcrumbPlugin'],
        'parent_classes': {'BreadcrumbPlugin': None},
        'glossary': cascade_workarea_glossary,
    },
    'Commodity Details': {
        'plugins': ['BootstrapContainerPlugin', 'BootstrapJumbotronPlugin'],
        'parent_classes': {
            'BootstrapContainerPlugin': None,
            'BootstrapJumbotronPlugin': None,
        },
        'glossary': cascade_workarea_glossary,
    },
    'Main Content': {
        'plugins': ['BootstrapContainerPlugin', 'BootstrapJumbotronPlugin'],
        'parent_classes': {
            'BootstrapContainerPlugin': None,
            'BootstrapJumbotronPlugin': None,
            'TextLinkPlugin': ['TextPlugin', 'AcceptConditionPlugin'],
        },
        'glossary': cascade_workarea_glossary,
    },
    'Static Footer': {
        'plugins': ['BootstrapContainerPlugin', ],
        'parent_classes': {
            'BootstrapContainerPlugin': None,
        },
        'glossary': cascade_workarea_glossary,
    },
}
@ljluestc
Copy link

In section 19.2.2. Django-CMS and Cascade settings, explanation of default settings:

The CMS_PLACEHOLDER_CONF settings control the available plugins and their placement within different placeholders. These settings are important for structuring the content layout of your pages. However, depending on your specific project and use case, the default settings may vary.

The default placeholders and their settings are provided in the Django CMS Installer-generated projects. The default CMS_PLACEHOLDER_CONF settings you've mentioned:

CMS_PLACEHOLDER_CONF = {
    'Breadcrumb': {
        'plugins': ['BreadcrumbPlugin'],
        'parent_classes': {'BreadcrumbPlugin': None},
    },
    'Commodity Details': {
        'plugins': ['BootstrapContainerPlugin', 'BootstrapJumbotronPlugin'],
        'parent_classes': {
            'BootstrapContainerPlugin': None,
            'BootstrapJumbotronPlugin': None,
        },
    },
    'Main Content': {
        'plugins': ['BootstrapContainerPlugin', 'BootstrapJumbotronPlugin'],
        'parent_classes': {
            'BootstrapContainerPlugin': None,
            'BootstrapJumbotronPlugin': None,
            'TextLinkPlugin': ['TextPlugin', 'AcceptConditionPlugin'],
        },
    },
    'Static Footer': {
        'plugins': ['BootstrapContainerPlugin', 'BootstrapJumbotronPlugin'],
        'parent_classes': {
            'BootstrapContainerPlugin': None,
            'BootstrapJumbotronPlugin': None,
        },
    },
}

These settings define available plugins for each placeholder, the parent classes of those plugins, and optionally a glossary configuration.

However, depending on the project's needs and structure, some variations may occur. The documentation might show an example with an additional 'glossary': cascade_workarea_glossary key for each placeholder. This additional key provides a glossary configuration, which can be useful for fine-tuning the appearance and behavior of the plugins within the Cascade Work Area. If this additional configuration is not required, the default settings without the glossary configuration can be used.

In summary, the CMS_PLACEHOLDER_CONF settings are customizable to suit your specific requirements. The default settings provided in the Django CMS Installer-generated projects offer a starting point, but you can adjust these settings as needed to achieve the desired layout and functionality for your project.

Please note: Be sure to replace cascade_workarea_glossary with the actual glossary configuration if you have one in your project. Also, ensure that the explanation matches the purpose and behavior of the placeholders and plugins in your specific Django CMS project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants