[opencms-dev] DownloadGalleryWidget: Change (selected) default gallery

Rüdiger Kurz r.kurz at alkacon.com
Tue Feb 9 14:06:02 CET 2010


Hello,

Since Version 7.5.0 it is possible for all gallery-widgets to setup a 
global start-gallery and a starting point.

Therefore you have to modify the the node <layout> in the xsd-schema 
with an optional attribute.

The configuration for a download gallery could look like the following
...
<xsd:element name="Download" type="OpenCmsVfsFile" />
...
<layouts>
   <layout element="Download" widget="DownloadGalleryWidget"
   configuration="{startup:"/demo_de/documents/",type:"gallery"}" /> 

</layouts>


A configuration for e link gallery could look like:
...
<xsd:element name="Link" type="OpenCmsVfsFile" />
...
<layouts>
     <layout element="Link" widget="LinkGalleryWidget" 
configuration="{startup:"externe/sprache/",type:"category"}" />
</layouts>

While defining a category the first "/" has not to be at the beginning.

Kind regards
Rüdiger

Am 09.02.2010 13:49, schrieb Legasa Xabier:
> Hi everybody !
>
> PROBLEM:
>
> Does anybody know *how could I configure the default selected gallery*
> in a *DownloadGalleryWidget* dialog ? (used to upload a file into a
> download gallery)
>
> PRACTICAL EXAMPLE:
>
> User /John/ its allowed to upload stuff to gallery //gallery/A/ and
> //gallery/B/ . At this moment selected gallery at
> *DownloadGalleryWidget* dialog by default is always A. How can I make
> that from the page /documents.html/ the selected gallery is A and from a
> different page /news.html/ the default selected gallery in the widget is B ?
>
> CODE:
>
> In the direct-edit feature, I edit a lets say */personalDoc/* which
> layout is a DownloadGalleryWidget. But because the user is allowed to
> upload stuff to different galleries, I need to specify in the
> direct-edit button or somewhere, which is the default gallery for this
> resource. This is my */personalDoc.xsd /*file*/:/*
>
> <xsd:element name="Resource" type="OpenCmsVfsFile" minOccurs="1"
> maxOccurs="1"/>
>
> ...
>
> <layouts>
>
> <layout element="Resource" widget="*DownloadGalleryWidget*"/>
>
> </layouts>
>
> ...
>
> Any idea there ?
>
> Thanks!
>
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

-- 
Kind Regards,
Rüdiger

-------------------
Rüdiger Kurz

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list