-1

I defined TTW (Through The Web) a Plone (4.3.4) Dexterity Content Type. The content type should contain images, which I defined in the content type settings.

I paced an own view for this content type as a page template in portal_skins->custom, which displays the fields of this content type and the containing images as an gallery. I want to use the plonetruegallery add-on to display the images as an gallery.

Here is the Page Template which I used:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  xmlns:metal="http://xml.zope.org/namespaces/metal"
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"lang="en"
  metal:use-macro="context/main_template/macros/master" i18n:domain="plone">
<body>
 <metal:content-core fill-slot="content-core">
  <metal:content-core define-macro="content-core"
                    tal:define="widgets nocall:context/@@view">

    <img tal:replace="structure context/@@placegalleryview" />

   <div tal:replace="structure widgets/++widget++myfield1/render">
        Topic of the story
   </div>

   <div tal:replace="structure widgets/++widget++myfield2/render">
        The story
   </div>

  </metal:content-core>
 </metal:content-core>
</body>
</html>

First it seemed everything looks fine and the integration of plonetruegallery through the "@@placegalleryview" function works well. BUT there was a strange behaviour, the DropDown-Menues in the green edit bar did not function. A short view to the html page source shows the reason: the @@placegallerview function inserted a complete page including tag and all css declarations.

My question: Is there an easy way to integrate the plonetruegallery or do I have to integrate my own javascript based gallery (e.g. bootstrap)?

Hope someone can give me an answer. There are less documentation out there for newbies and for TTW working people. This is also the reason, why I wrote this simple question extensive.

Nik
  • 1
  • 1

1 Answers1

1

collective.plonetruegallery itself recommends using <object> tag to embed a gallery in another page:

Inline Gallery

For showing a gallery in another page, try something like this::

<object data="path/to/gallery/@@placegalleryview" height="400" width="500">
    <param name="data" value="path/to/gallery" />   
</object>

You could use this instead of <img tal:replace=... />.

More info: https://github.com/collective/collective.plonetruegallery/blob/master/README.txt

Thiago Curvelo
  • 3,711
  • 1
  • 22
  • 38