• Arnaud Bourrée
    Arnaud Bourrée, 2011/03/15 17:42

    Could it be extended to slide show of wiki pages?

    • Marius Dumitru Florea
      Marius Dumitru Florea, 2011/03/15 18:10

      Not easily. The gallery macro doesn't do much: it just wraps the macro content with a DIV that has the "gallery" CSS class. All the logic is in the JavaScript code, which collects all the images from the macro output. Unless you find a way to "export" a wiki page as an image you can't use the gallery macro to view wiki pages.

      Generally speaking, creating a slide show of wiki pages without using images (generated screenshots) or an IFRAME element is hard to do because you have to handle the interference between the page that hosts the slide show and the pages that are displayed in the slide show (HTML, CSS and JavaScript interference).

  • Bradley Bristow-Stagg
    Bradley Bristow-Stagg, 2011/06/23 08:45

    Any chance of extending this so that you could show a footnote for each image?  Perhaps use the alt text as the footnote.  My thinking is using the gallery as part of a step-by-step tutorial where you flip between the images and the footnotes describes what you should be doing.  This would make the images more meaningful rather than a beauty pass gallery (which looks great by the way).

    I guess something like:
    {{gallery}}
    image:iphone.safari.settings.png||alt="Open the settings page for Safari"

    image:iphone.safari.setting.cookies.png||alt="Ensure that Javascript is turned on and Cookies is set to From Visited"
    {{/gallery}}

    I am looking at using XWiki for our Documentation and am enjoying it so far.

  • Bradley Bristow-Stagg
    Bradley Bristow-Stagg, 2011/07/01 02:30

    Thanks Marius, added (https://jira.xwiki.org/browse/XWIKI-6762).  LOL it's probably not a Major priority for others, but it is for me emoticon_smile

    Hopefully someone can whip this baby up for me.

  • Bradley Bristow-Stagg
    Bradley Bristow-Stagg, 2011/08/05 08:38

    Is there any way of specifying the width of the gallery container?

    • Marius Dumitru Florea
      Marius Dumitru Florea, 2011/08/16 17:00

      Currently no. The width and height of the gallery container is computed from the image max width/height, which are hard-coded in resources/uicomponents/widgets/gallery/gallery.css . I could add a maxWidth and maxHeight parameters to the gallery macro, and pass them to the gallery.css in the URL. Can you open a JIRA issue for this too? Thanks.

  • Dmitry Bakbardin
    Dmitry Bakbardin, 2011/09/16 06:57

    I failed to run macro with abovementioned code

    {{velocity}}
    {{gallery}}
    #foreach($attachment in $doc.attachmentList)
      #if($attachment.isImage())
        image:$attachment.filename
      #end
    #end
    {{/gallery}}
    {{/velocity}}

    Some modifications made it workable for me.

    {{velocity}}
    {{gallery}}
    #foreach($attachment in $doc.attachmentList)
      #if($attachment.isImage())
       [[image:[email protected]$attachment.filename]]
      #end
    #end
    {{/gallery}}
    {{/velocity}}
    • Vincent Massol
      Vincent Massol, 2011/12/15 19:56

      Dmitry, I've tried the script again and it works fine for me. The version you wrote just makes the image link absolute. We had a bug fixed in recent version of XE when including a page that has relative links/images. Maybe you hit it.

Get Connected