Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Using IFrame module with Pass-through QueryString parameterUsing IFrame module with Pass-through QueryString parameter
Previous
 
Next
New Post
2/20/2008 7:08 PM
 

I just thought I'd share my experience with using the IFrame module and how to get it to automatically display all files in a specific folder.

First of all, I'm storing files on the file system, not the DB, so this is only applicable to that.  What I first did was create a simple .asp page that uses the windows FileSystemObject and loops through the Files collection in a specific folder and dynamically builds a HTML table that displays the name, size, and lastmoddate of each file, along with a hyperlink to each file.  I did this because I don't want to use the Links or documents modules and have to manually link to every single file on my site, as there are 100's of files. (Now if there is a way to automatically create links to every file in a folder using the Links or Documents module, I'd love to know how)

I have this .asp file in the root folder of my portal.  It uses a querystring to navigate to the appropriate folder containing the files I want to display.  I have one parameter named "subfolder" that tells it which folder to navigate to. 

I also created a new virtual directory in IIS named "ISPortal"

I then created a Master IFrame page and added an IFrame module it.  I am going to use this one page to display the files from any folder.  For the IFame options, I set the URL to point to my .asp file (Do NOT include the "?" at the end of the URL - it won't work).  So it would by my server name + virtual directory + .asp file name.

So for my purposes, I named my ASP page "FileList.asp". Assuming my intranet web address is http://myserver, the URL I configured in the IFrame module would be:

http://utsrmweb/ISPortal/FileList.asp

I then added a QueryString parameter:

  Name:  subfolder

  Value:  Pass-Through Querystring

  Unlabeled field:  subfolder

This last part is what threw me at first.  In the text box to the right of the Value drop-down box, there is no label on it, so I had no idea what it was.  I thought it was just for providing a hardcoded or static value.  I had specified the querystring parameter name in the "Name" field, thinking that was supposed to be the name of my querystring parameter, but it actually looks to just be the name you using for DNN purposes to identify the querystring paremeter.  The actual querystring parameter you are using in the URL goes in the unlabeled field. Thus, in my case I used the same value as for the "Name" field - "subfolder".

(I set the height and width to 800/600)

Once my IFrame page was created, then I simply had to configure each of my pages to link to that page, passing in the appropriate querystring parameter for the "subfolder".  Thus, I went into the Settings of each page, expanded the "Advanced Setting" and scrolled all the way down to the bottom of the screen to under "Other Settings".  There I clicked the "URL (A link to An External Resource)" link type radio button, which then displayed a "location" field.  In this field I put the URL to the master IFrame page I created + "?subfolder=" + path to subfolder containing the files to display.

It is important to note that the querystring MUST be URLEncoded.  If for example I have a "Project Documentation" folder off the root of the portal, and below that I have a "MyFiles" folder containg the files I want to display, then the complete URL would be (Including the URL encoding) comprised of the following pieces:

http://mywebserver/dotnetnuke/Documents/ISDocumentation/FileListing/tabid/124/Default.aspx  (This is the path to my master IFrame page. Yours will be different)  +

?subfolder=  (This is my querystring parameter)  +

Project%20Documentation%5CMyFiles (The URL encoded querysting value, pointing to the folder where my files reside)

The complete URL would be (What you would enter in the Location field):

http://mywebserver/dotnetnuke/Documents/ISDocumentation/FileListing/tabid/124/Default.aspx?subfolder=Project%20Documentation%5CMyFiles

Thus, using this method, I don't have to put a IFrame module on every webpage.  Instead, each page links to this master IFrame page, with the appropriate querystring "subfolder" parameter.  So should I need to change the IFrame display settings, I only have to do this in one place.  And anytime I have new files or documents I want to display, all I have to do is uploaded them to the appropriate existing directory.  My .asp page will automatically display every file/document.

Hope this helps someone.

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Using IFrame module with Pass-through QueryString parameterUsing IFrame module with Pass-through QueryString parameter


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out