Creating/Displaying uploads

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 4, 2008   (RSS)

By keith_s - April 2, 2008

I'm working on my first installation of CMSB and am trying to create and display uploaded files.

Here's my questions:
  1. Do I create a Section Editor like I would for a simple updateable page? If the only field that is going to be used is an "upload" field, then would it be normal for the mysql table shown in the Section Editors list in the CMS manage to have zero entries since the "uploads" table will contain the uploads?
  2. How do I display the list of files? I've tried every way that I can read about, but simply can't get anything to work.


Here is the scenario:
  • I'm using a php include function to call in a table of uploaded files. The php include file is named "navHRinc.php". In the CMS editor, I created a Section Editor with a mysql table named "hrdocuments".
  • The HR Documents Section Editor (single page) only has one field, (label: list/name: documentlist/field type: upload).


Here's an link to a test page that I'm using to try to get this to work: http://www.decaturcountyga.org/hrdocumentsPage.php



[cool] HELP PLEASE...

Re: [keith_s] Creating/Displaying uploads

By Dave - April 2, 2008

Hi Keith, welcome to the forums! :)

To answer your questions, yes, you'd create a section editor. Even though the uploads are stored in a separate table they're accessed through the viewer code which displays records from the section editors (I hope that makes sense!).

If you're just going to have one page for documents you might want to set that section to be a "Single Page" editor. You can do that under: Section Editors > HR Documents > Section Type.

What you have setup looks right. Do you have any files uploaded for record 1 in the "HR Documents" section? The page viewer hrdocumentsPage.php will always display record 1 by default unless you specify a different record number on the url (eg: hrdocumentsPage.php?2)

Let me know if you have files uploaded for record 1. If you do and there still not showing up I can always login and take a look. Just email details to dave@interactivetools.com (email, don't post login details in forum).

Hope that helps, let me know if there's anything else I can do to assist.
Dave Edis - Senior Developer
interactivetools.com