Using django-cms, how can I allow the user to specify a background image

前端 未结 3 1645
无人及你
无人及你 2021-01-13 05:34

I am creating a django-cms site for a client. I would like to do something like:



        
3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-13 05:49

    You are on the right track, once that's there when all you need is the plugin which in this case you can use filer. And to make it better you can use the CMS_PLACEHOLDER_CONF setting to only allow that one plugin to be placeholder inside the background-image placeholder, like so:

    CMS_PLACEHOLDER_CONF = {
        'background-image': {
            "plugins": ('YourImagePlugin', ),
            'name':"Background Image",
            'limits': {
                'global': 1,
            },
        },
    }
    

提交回复
热议问题