video cms plugin
This commit is contained in:
parent
66d1e4e046
commit
80e08c1b40
8 changed files with 155 additions and 32 deletions
|
|
@ -5,7 +5,8 @@ from .models import (
|
|||
UngelichContactUsSection, UngelichTextSection, Service, ServiceItem,
|
||||
About, AboutItem, SectionWithImage, UngleichServiceItem, UngleichHeader,
|
||||
UngleichHeaderItem, UngleichProductItem, UngleichProduct, UngleichCustomer,
|
||||
UngleichCustomerItem, UngleichHTMLOnly, UngleichSimpleHeader
|
||||
UngleichCustomerItem, UngleichHTMLOnly, UngleichSimpleHeader,
|
||||
UngleichHeaderItemWithVideo
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -200,7 +201,10 @@ class UngleichHeaderWithTextAndImageSliderPlugin(CMSPluginBase):
|
|||
render_template = "ungleich_page/ungleich/header_with_slider.html"
|
||||
cache = False
|
||||
allow_children = True
|
||||
child_classes = ['UngleichHeaderItemPlugin']
|
||||
child_classes = [
|
||||
'UngleichHeaderItemPlugin',
|
||||
'UngleichHeaderItemWithVideoPlugin',
|
||||
]
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
context['instance'] = instance
|
||||
|
|
@ -224,6 +228,23 @@ class UngleichHeaderItemPlugin(CMSPluginBase):
|
|||
return context
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
class UngleichHeaderItemWithVideoPlugin(CMSPluginBase):
|
||||
name = "ungleich Header Item With Video Plugin"
|
||||
model = UngleichHeaderItemWithVideo
|
||||
render_template = "ungleich_page/ungleich/_header_video_item.html"
|
||||
cache = False
|
||||
require_parent = True
|
||||
parent_classes = ['UngleichHeaderWithTextAndImageSliderPlugin']
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
context = super(UngleichHeaderItemWithVideoPlugin, self).render(
|
||||
context, instance, placeholder
|
||||
)
|
||||
context['instance'] = instance
|
||||
return context
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
class UngleichProductsPlugin(CMSPluginBase):
|
||||
name = "ungleich Products Plugin"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue