AW: [opencms-dev] How to associate downloads with pages?
Andreas Zahner
A.Zahner at alkacon.com
Thu May 15 14:22:01 CEST 2003
Tristan,
My suggestion is: just attach a property to the file with a path to a
folder, e.g. "/downloads/file1/". In this folder, create links with the
new page wizard to the real download files which could be located
together in one folder. For each download file list, create such a
folder with links in it.
Regards,
Andreas Zahner
Alkacon Software - The OpenCms Experts
http://www.alkacon.com
-----Ursprüngliche Nachricht-----
Von: opencms-dev-admin at opencms.org
[mailto:opencms-dev-admin at opencms.org] Im Auftrag von Tristan Roddis
Gesendet: Donnerstag, 15. Mai 2003 13:29
An: opencms-dev at opencms.org
Betreff: Re: [opencms-dev] How to associate downloads with pages?
On Thu, May 15, 2003 at 10:30:44PM +1200, David Tildesley (DSLWN) wrote:
> why don't you write java class or JSP code using ocms API to list
> files in a parameter specified download VFS directory and read
> properties associated with each file for displaying title and building
> link. Incorporate in template.
That's what I was thinking of doing for the display side of things. My
problem is to do with the fact that each page will have different
downloads displayed on it, so I need some way to tell the page which
download files to display, rather than just 'show all files in this VFS
directory' for every page...
I am starting to think that the most OpenCMS-y way to do this would be
to store the list of download resources as a property of each page (i.e.
option c) below), by using the CmsOject.writeProperty() method. Does
anybody have any better ideas? (and/or suggestions as to why this might
be a Bad Thing - e.g. is there a size limit for each property?)
Thanks,
-T.
> > -----Original Message-----
> > From: Tristan Roddis [mailto:tristan at roddis.org]
> > Sent: Thursday, 15 May 2003 11:14 p.m.
> > To: opencms-dev at opencms.org
> > Subject: Re: [opencms-dev] How to associate downloads with pages?
> >
> >
> > On Wed, May 14, 2003 at 12:56:06PM +0300, Dimitri Bougoulias wrote:
> >
> > > I'm working on a module that does that easily and I may be
> > able to publish
> > > it to the opencms site by the end of the month.
> >
> > Unfortunately, I need to get started straight away :(
> >
> > Can I ask where you're planning to store this information? Is it:
> >
> > a) in a new database table (two columns: pageUri and downloadUri)
> > b) in an XML definition file somewhere in the VFS (lots of
> > blocks along
> > the lines of:
> > <page name="/website/section/foo.html">
> > <download>/downloads/gallery1/bar.doc</download>
> > <download>/downloads/gallery2/baz.pdf</download>
> > </page>
> > c) as a Property of the page (along the lines of
> > Downloads: /downloads/gallery1/bar.doc,/downloads/gallery2/baz.pdf )
> > d) other (please state)
> >
> > Also, does anybody else have any suggestions as to the best way to
> > do
> > this? You can just reply with a,b,c etc. if you want :)
> >
> > Thanks,
> >
> > -T.
> >
> > > -----Original Message-----
> > > From: opencms-dev-admin at opencms.org
> > [mailto:opencms-dev-admin at opencms.org]
> > > On Behalf Of Tristan Roddis
> > > Sent: Wednesday, May 14, 2003 1:34 PM
> > > To: opencms-dev at opencms.org
> > > Subject: [opencms-dev] How to associate downloads with pages?
> > >
> > >
> > > I need to let site administrators assign downloadable files
> > to any page
> > > within the site, and have them appear as a
> > prettily-formatted table at the
> > > bottom of the page with the following fields:
> > >
> > > Title, file size, file type
> > >
> > > Because the design dictates that these need to be in a
> > table, then I can't
> > > just use the standard HTML page editor, as our
> > administrators don't know
> > > HTML [plus the downloads function doesn't seem to work in
> > 4.6.6 :) - see
> > > thread 'Ledit is driving me crazy')]
> > >
> > > So, I was wondering if anybody had any suggestions as to
> > the best (and
> > > most OpenCMS-like) way of doing this?
> > >
> > > Essentially I can see two problems: 1) where to store the
> > information that
> > > associates download files with pages and 2) how best to let
> > the user
> > > assign downloads to pages.
> > >
> > > For 1) I can think of:
> > >
> > > a) in a new database table (two columns: pageUri and downloadUri)
> > > b) in an XML definition file somewhere in the VFS (lots of
> > blocks along
> > > the lines of:
> > > <page name="/website/section/foo.html">
> > > <download>/downloads/gallery1/bar.doc</download>
> > > <download>/downloads/gallery2/baz.pdf</download>
> > > </page>
> > > c) as a Property of the page (along the lines of
> > > Downloads: /downloads/gallery1/bar.doc,/downloads/gallery2/baz.pdf
)
> > > d) other (please state)
> > >
> > > Then my display class can read from one of the above, get
> > the resource
> > > title, filesize and type, and insert some
> > prettily-formatted HTML as a data
> > > block into the display template.
> > >
> > > For 2) I can think of:
> > >
> > > a) A module or other admin template that will firstly allow
> > a user to
> > > select a page, and secondly allow a user to add and remove
> > the downloads
> > > assigned to the page
> > > b) Adding/reusing a button on the HTML editor to allow
> > users to assign
> > > downloads to that page
> > > c) other (please state)
> > >
> > > Has anybody got any opinions on which of the above choices
> > would be best?
> > > Factors to consider include i) how easy is it to implement
> > and ii) how well
> > > does it fit in with the rest of OpenCMS (e.g. I'd imagine
> > that reading a
> > > page's properties is easier and more OpenCMS-like than
> > using a sepearate
> > > database table). Efficiency isn't a great concern as it's a
> > very small site,
> > > and we'll be using static export.
> > >
> > > Also, any pointers or tips for how to use any exisiting
> > OpenCMS components
> > > (e.g. the file picker or the download gallery selection
> > pages) would be
> > > greatly appreciated.
> > >
> > > Thanks in advance,
> > >
> > > -Tristan.
> > >
> > > --
> > > tristan at roddis.org
> http://www.roddis.org
> >
_______________________________.oOo._________________________________
> > "Software without secrets."
http://www.linux.org
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list To change
> > your list options, or to unsubscribe from the list, please visit
> > http://mail.opencms.org/mailman/listinfo/opencms-dev
> >
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list To change
> > your list options, or to unsubscribe from the list, please visit
> > http://mail.opencms.org/mailman/listinfo/opencms-dev
> >
>
> --
> tristan at roddis.org http://www.roddis.org
> _______________________________.oOo._________________________________
> "This is war!" http://www.theregister.co.uk/content/6/26433.html
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please
> visit http://mail.opencms.org/mailman/listinfo/opencms-dev
>
--
tristan at roddis.org http://www.roddis.org
_______________________________.oOo._________________________________
"Linux. The best choice for embedded systems."
http://www.linuxdevices.com
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please
visit http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list