Glossary Item Box

Modules: Modules

Controls: Controls

See Also CmsDeveloperGuide Send comments on this topic.

Remote content

RemoteContent module can download any content from internet and display it on the site page. You can define external page URL, request encoding name and request answer caching time by administrative interface.

 

A template file for this module lies in a modules/RemoteContent folder and looks as follows:

<%@ Control Language="c#" Inherits="CMSLib.Pages.SiteControl" %>
<%@ Register TagPrefix="cms" Namespace="CMSLib.Modules.RemoteContent" Assembly="CMSLib" %>

<cms:RemoteContent id="RemoteContent1" runat="server" />

 

A template of this module doesn’t need to be tuned.

 
Remote page receives a path to the current site page through the 'pagePath' query string parameter.
 
To the requested URL it is also added all query string parameters the site page has, except for the system ones (item, type, key and contextMenuItem).
 
For example your site received a query http://YourSite/showPage?mykey=123&myname=456. This page contains information with URL http://MyRemoteUrl/page.html. Then CMS makes the following request to this page: http://MyRemoteUrl/page.html?mykey=123&myname=456. In such a way you can deliver parameters to the remote page.
 
You can place downloaded content everywhere on your site.
 
For that you should set RemoteURL attribute into required page URL. You can also set request encoding by EncodingName attribute and request answer caching time by CacheSecond attribute (by default 3600 seconds).
For example:
<%@ Register TagPrefix="cmsr" Namespace="CMSLib.Modules.RemoteContent" Assembly="CMSLib" %>
...
<cmsr:RemoteContent ID="RemoteContent1" runat="server" RemoteURL="http://google.com" EncodingName="utf-8"
    CacheSecond="60"
 />

Modules: Modules

Controls: Controls

 

 


© 2005-2007 Astron Digital Ltd. All Rights Reserved.