![]()
Use the HTML Consumer page to display HTML content from an external site, to display content syndicated from an external publisher, or to display HTML formatted content created and maintained in another software application.
You can elect to display content from a file that contains HTML or direct the system to an external URL to obtain the HTML. The HTML Consumer page type will render the HTML within the content area of the ACM page.
Navigate to the page that will be the parent of the new page. See Parent and child pages if you are unsure what this means.
Mouse over the +Childpage button and select HTML Consumer from the list of page types. If you do not see the +Childpage button you may have insufficient user rights to add pages: speak to your system administrator.
Complete the Page Summary and the General Properties sections of the page.
Complete the HTML SourceHTML Source section.
File: Enter the complete path of the file you wish to upload to this page or use the Browse button to locate the file. This file would typically reside on your web server or another server that is always accessible.
URL: Enter the URL of the site/page where the HTML Consumer page can obtain the desired HTML. Enter the URL preceded by http://. This is the URL of the starting page.
Note: In order to include the full path of any digital assets included in the source page, you can add the “?UseAbsolutePaths=True" parameter to the end of the page's URL.
The HTML consumer pagetype handles relative URLs.
Common URL Base Path: This field allows you to enter a “Common Source URL path”. Then, regardless of how the source page is redirected, as long as it contains the common source URL path, it is rendered as the new source page of the HTML consumer page. If you leave this field blank, the previous HTML consumer page is used.
Additional File List: In the text area provided, enter a list of supported file names, separated by comma. If the Common Source URL path filed is not blank, only URLs with both the common URL and a supported file name will be rendered by the HTML consumer page.
Load from file: You can also upload a text file with list of file names (comma separated) to append to the list.
Complete the HTML ParsingHTML Parsing section.
Use Body Text - Select this option to display all content within the body tags of the originating HTML file.
Use My RegEx - Use this text box to create your own RegEx in order to customize the displayed content from the originating HTML file. For example, you could use RegEx to define the amount of content you wish to display from the HTML source.
Complete the Search and Replace in ContentSearch and Replace in Content section.
Use this section to provide terms that should be searched and replaced in the content before it is displayed.
For each word or string you wish to search and replace:
Click Add.
In the Search Term field, enter the text to search for.
In the Replace Term field, enter the text you want substituted.
Check the Case Sensitive checkbox if you want to match case in the search and replace.
You can add map links using the Address ParsingAddress Parsing section.
Use the Address Parsing section to display a map link for each address. The pagetype can identify the pattern of the address string in the source code, and automatically render a map link to attach to the address.
For example, if the address pattern is as follows::
<tr><td>Location</td><td>[Center Name]<br>[Street # and Street Name] <br>[city], [provice/state], [country] [postal code]</td></tr>
the system will interpret the address pattern as:
<tr><td>Address</td><td>[Street # and Street Name]<br>[city], [provice/state], [country] [postal code]</td></tr> .
Order: The order in which the entries in this section were created.
Match RegEx: This field is where you enter a regular expression to find the block containing the address and identifies it in the block. For example:
Address\s*</td>\s*<td>(?<Address>.*)</td>\s*</tr>
This finds all the blocks in the HTML that match the expression, and identifies that the portion between the <td> and </td> is the actual address. The match regex needs to identify the address part with the <Address> tag.
Link Text: This is what will be appended to the matched block. For example:
<tr><td></td><td>{Link}</td></tr>
This will be appended to the matched block with {Link} replaced with the map link. The Link Text needs to have the {Link} tag.
Case Sensitive: If you want to impose case sensitivity during parsing, check this checkbox.
Multiline: If you expect there to be matches that span more than a single line, check this checkbox. Regex will then consider matches over multiple lines of code.
Delete: Click the Delete icon to remove an entry from the section.
Complete the Redirect ParsingRedirect Parsing section.
Redirect parsing will intercept attempts by the source page to send you to another URL. The identifying text will tell the page what to look for in a response to determine that the source page has responded with a redirect.
The URL extract in the box will identify the block containing the URL (identifying the URL itself with the required <RedirectURL> tag) the source page is trying to send you to.
For example: if the identifying text is "<title>Redirect", then if the source page response contains that text, it will look for the URL using something like:
window.open\("(?<RedirectURL>.*?)".
The page will then get the response for that URL , and render that response instead of the redirect.
Complete the Frame ParsingFrame Parsing section.
Frame parsing occurs when the source page responds with a group of frames (which cannot be rendered inside of an ACM template). The Frame Regex tells the HTML consumer how to parse out the list of frames and get the name and URL for each frame (<Name> and <FrameURL>). The Frame Name will tell the HTML consumer which frame to use to get a response to render, using the frame URL.
Complete the File/URL SettingsFile/URL Settings section.
Read Error Message - The text you type in this window is displayed when there is a problem retrieving or displaying the HTML on the published HTML Consumer page.
URL Timeout (milliseconds) - enter a timeout length in milliseconds. The Default is 1000 milliseconds.
Enter the Header HTML text. This information will be displayed above the external HTML.
Enter the Footer HTML. This information will be displayed below the external HTML.
You cannot confine external HTML content within a specified space on your HTML Consumer pages, so you must ensure you have templates that will work correctly with external content displayed on your site.
Click Save and submit page for publication.
For further information on RegEx, see:
Wikipedia's Regular Expression information.
An online Regex Library