Commits

tehfink  committed 7db6fda

better checking for if a plugin is inside the Text plugin

  • Participants
  • Parent commits 2cafe5c
  • Branches cms-2.X

Comments (0)

Files changed (3)

File cmsplugin_photologue/cms_plugins.py

         #set plugin template from plugin model
         self.render_template = "plugins/cmsplugin_photologue/%s" % instance.get_template_display()
 
+        inline = True if instance.parent else False
+
         context.update({
             'gallery':      instance.gallery,
             'placeholder':  placeholder,
             'paginate_by':  5,
             'sample_size':  ":%s" % instance.sample_size,
             'css':          instance.get_css_display(),
-            'text_enabled': self.text_enabled,
+            'inline':       inline,
         })
         return context
 
         #set plugin template from plugin model
         self.render_template = "plugins/cmsplugin_photologue/%s" % instance.get_template_display()
 
+        inline = True if instance.parent else False
+
         context.update({
             'photo':        instance.photo,
             'placeholder':  placeholder,
             'queryset':     Photo.objects.filter(is_public=True),
             'is_thumb':     instance.is_thumb,
             'css':          instance.get_css_display(),
-            'text_enabled': self.text_enabled,
+            'inline':       inline,
         })
         return context
 

File cmsplugin_photologue/templates/plugins/cmsplugin_photologue/photologue_gallery.html

-{% if text_enabled %}
+{% if inline %}
 
     <span class="photo-gallery{% if css %} {{ css }}{% endif %}">
 
 
     <div class="photo-gallery{% if css %} {{ css }}{% endif %}">
 
-        <h2><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></h2>
+        <h1><a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a></h1>
 
         {% for photo in gallery.sample|slice:sample_size %}
 

File cmsplugin_photologue/templates/plugins/cmsplugin_photologue/photologue_photo.html

-{% if text_enabled %}
+{% if inline %}
 
     <span class="gallery-photo{% if css %} {{ css }}{% endif %}">