Skip to content

[feat] Name placeholder of static alias like the static alias #228

@fsbraun

Description

@fsbraun

This issue has been raised by Tow Cowan on Slack and @petrklus:

I used static_placeholder to allow site-wide content to be edited, and could control the plugins used in this with the CMS_PLACEHOLDER_CONF setting. I’m now using v4 for a new project - am I able to do something similar with the static_alias tag? I don’t seem to be able to do so with the configuration I’ve tried.
For example, if I have the following in my base.html template (outside of any blocks):

{% static_alias 'banner' %}

And then the following in my settings:

CMS_PLACEHOLDER_CONF = {
	"banner": {
		"plugins": ["BannerPlugin"],
	},
}

When I view the Alias (Django Admin -> Django CMS Alias -> Aliases -> Preview) and then try to add a plugin, it ignores the above placeholder config. If I add a key for a “content” placeholder in CMS_PLACEHOLDER_CONF it does allow me to configure the available plugins, but this would mean that all of my static_alias tags would have the same configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions