Introduce ungleich Header with Background and Image Slider plugin
This commit is contained in:
parent
0ca4a83860
commit
9beacd6f6a
5 changed files with 137 additions and 1 deletions
|
|
@ -5,7 +5,9 @@ from .models import (
|
|||
UngelichContactUsSection, UngelichTextSection, Service, ServiceItem,
|
||||
About, AboutItem, SectionWithImage, UngleichServiceItem, UngleichHeader,
|
||||
UngleichHeaderItem, UngleichProductItem, UngleichProduct, UngleichCustomer,
|
||||
UngleichCustomerItem, UngleichHTMLOnly, UngleichSimpleHeader
|
||||
UngleichCustomerItem, UngleichHTMLOnly, UngleichSimpleHeader,
|
||||
UngleichHeaderWithBackgroundImageSlider,
|
||||
UngleichHeaderWithBackgroundImageSliderItem
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -224,6 +226,41 @@ class UngleichHeaderItemPlugin(CMSPluginBase):
|
|||
return context
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
class UngleichHeaderBackgroundImageAndTextSliderPlugin(CMSPluginBase):
|
||||
name = "ungleich Header with Background and Image Slider Plugin"
|
||||
model = UngleichHeaderWithBackgroundImageSlider
|
||||
render_template = (
|
||||
'ungleich_page/ungleich/header_with_background_image_slider.html'
|
||||
)
|
||||
cache = False
|
||||
allow_children = True
|
||||
child_classes = ['UngleichHeaderBackgroundImageAndTextItemPlugin']
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
context['instance'] = instance
|
||||
return context
|
||||
|
||||
|
||||
@plugin_pool.register_plugin
|
||||
class UngleichHeaderBackgroundImageAndTextItemPlugin(CMSPluginBase):
|
||||
name = "ungleich Header with Background and Image and Text Item Plugin"
|
||||
model = UngleichHeaderWithBackgroundImageSliderItem
|
||||
render_template = (
|
||||
'ungleich_page/ungleich/_header_with_background_image_slider_item.html'
|
||||
)
|
||||
cache = False
|
||||
require_parent = True
|
||||
parent_classes = ['UngleichHeaderBackgroundImageAndTextSliderPlugin']
|
||||
|
||||
def render(self, context, instance, placeholder):
|
||||
context = super(
|
||||
UngleichHeaderBackgroundImageAndTextItemPlugin, 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