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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Is there a prefab module that can "include" text/html from a file?Is there a prefab module that can "include" text/html from a file?
Previous
 
Next
New Post
3/25/2008 10:45 AM
 

I'm looking for a module that can point to a  text/html file (or maybe even a URL?) and display its contents inline. 

- something like the iframe module but instead of using an iframe to display the content, DNN reads and displays the content inline with the page as opposed to displaying the content within a frame.  Anyone have any suggestions?  Yes, i can simply make one or extend the iframe module, but I was hoping this sort of task is prefabricated.

Of course, the other option I've been using is simply copying & pasting into the Text/HTML module.

Do you think there is a better way of solving the problem that you may be guessing that I'm trying to solve?

 
New Post
3/25/2008 11:18 AM
 

scradam wrote

Do you think there is a better way of solving the problem that you may be guessing that I'm trying to solve?

Guessing is right.  Maybe if you told us what you're trying to do.  You might be looking for the Text/HTML mosule. or announcements, repository or even Ventrian's News module.

Jeff

 
New Post
3/25/2008 11:43 AM
 

Thank you for the response.

I am looking to accomodate the following two scenarios primarily:

  • I have content authors who want to author content in FrontPage.  Yes, they can create content in Front Page and then past the output into a Text/HTML module.  However, I would like it to be one step easier for them since I'm having a hard time getting their buy-in to DNN.  I'd like it to be as simple as them opening the .htm file in FrontPage and then see the results immediately reflected in DNN once they hit "Save".
  • The other instance is for certain pages & controls that I intend to to turn into DNN modules at some point - but haven't made the time yet.  I would simply like to display their output inline with a page almost exactly like I do with an iframe.

The existing iframe module is almost a perfect fit for my purpose.  The most notable problem with the iframe module for my purpose though is that displaying content inline with a page is a bit smoother as far as page rendering goes than using an iframe - and it's easier to inherit styles too.

If nothing else, I think I'll actually duplicate and extend the iframe module to read the source and then rewrite it to the client.  Something like:

System.Net.HttpWebRequest SomePageRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(SomeURL);
System.Net.HttpWebResponse SomePageResponse = (System.Net.HttpWebResponse)SomePageRequest.GetResponse();
System.IO.Stream ResponseStream = SomePageResponse.GetResponseStream();
System.IO.StreamReader ResponseStreamReader = new System.IO.StreamReader(ResponseStream, System.Text.Encoding.UTF8);
Response.Write(ResponseStreamReader.ReadToEnd());

 
New Post
3/25/2008 12:47 PM
 

Yeah, as a quick and dirty solution I did just what I suggested.  It works the way I want well enough.  I made a copy of the iframe module definition that is exactly the same except I changed the iframe element to a div tag and changed this in the code behind:

From this:

htmIFrame.Attributes.Add(Controller.Properties.Source, strSource)

To this:

htmIFrame.InnerHtml = (New System.IO.StreamReader(DirectCast(DirectCast(System.Net.WebRequest.Create(strSource), System.Net.HttpWebRequest).GetResponse(), System.Net.HttpWebResponse).GetResponseStream(), System.Text.Encoding.UTF8)).ReadToEnd()

This would be a great extension to the iframe module - the option could be exposed as a radio button on the edit page.  It would only take a few alterations and should work well.

 
New Post
3/25/2008 1:04 PM
 

Haven't checked to see if this works, but try a Text/HTML module with just an Include in it, pointing to the file they are updating.

Jeff

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Is there a prefab module that can "include" text/html from a file?Is there a prefab module that can "include" text/html from a file?


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