Web Wrapper
The Web Wrapper is a way to synchronize the look and feel of web sites between a netFORUM eWeb site implementation and a SharePoint implementation. The basis of this implementation is a web service between the SharePoint implementation and the eWeb implementation. The look and feel of the site header and footer can be created and maintained in SharePoint, but consumed by eWeb. The Wrapper web service provides the framework to wrap site content in eWeb with the same footer and header as that used within the SharePoint site.
Wrapper Web Methods
ClearCache
This method requires no parameters. Calling the method will clear the cache for the web service, this should only be necessary if changes were made to the site that need to be immediately propagated to the wrapper.
GetPageHeader
This method accepts one input parameter, ‘siteRelativeUrl’. The parameter can either be blank, in which case the wrapper will load the home page, or a valid relative Url to a page on the site. An example of a site relative Url is ‘/Pages/default.aspx’. The output of the method is a string containing the HTML markup of the page header.
GetPageHeaderNoForm
This method accepts the same input parameter and produces the same output document as GetPageHeader. The only difference is that HTML returned from this method will have the <form></form> elements removed. This is often necessary if the page being wrapped will contain its own form.
GetPageFooter
This method accepts one input parameter, ‘siteRelativeUrl’. The parameter can either be blank, in which case the wrapper will load the home page, or a valid relative Url to a page on the site. An example of a site relative Url is ‘/Pages/default.aspx’. The output of the method is a string containing the HTML markup of the page footer.
GetPageFooterNoForm
This method accepts the same input parameter and produces the same output document as GetPageFooter. The only difference is that HTML returned from this method will have the <form></form> elements removed. This is often necessary if the page being wrapped will contain its own form.
GetPageData
This method accepts one input parameter, ‘siteRelativeUrl’. The parameter can either be blank, in which case the wrapper will load the home page, or a valid relative Url to a page on the site. An example of a site relative Url is ‘/Pages/default.aspx’. The output of the method is a WrapperData XML document, the format of which is described below.
GetPageDataNoForm
This method accepts the same input parameter and produces the same output document as GetPageData. The only difference is that HTML returned from this method will have the <form></form> elements removed. This is often necessary if the page being wrapped will contain its own form.
GetPageScriptandCss
This method accepts one input parameter, ‘siteRelativeUrl’. The parameter can either be blank, in which case the wrapper will load the home page, or a valid relative Url to a page on the site. An example of a site relative Url is ‘/Pages/default.aspx’. The output of this method should be a list of Script source files and CSS links that can added to an include file.
Technical Details
There are three main methods mentioned above that are used in the baseline implementation.
- GetPageFooterNoForm
- GetPageHeaderNoForm
- GetPageScriptAndCss
To implement the web wrapper within netFORUM
1. Set the web.config options in eWeb to point to the correct web wrapper endpoint.
The eWebWrapperURL is a default value that will be used for all eWeb sites. If you need a different URL per eWeb site, you can use additional keys with the site code appended to the end (i.e. eWebWrapperURL_*SITE*).
2. Set the default top and bottom controls within CMS to point the the baseline web controls.
3. Set the Top and Bottom panes shown above to utilize the two baseline Wrapper controls, eWebWrapperFooter.acsx and eWebWrapperHeader.ascx.
Guidelines
- SharePoint Site Footer and Header should be confined within an unbreakable content block (basically any content block, tag, DIV, Table that is properly closed ).
- Comment should be placed right after the closed block on SharePoint site Master Page.
- Any unclosed table, div, table row, or table data tags in the header or footer strings consumed by eWeb will compromise the presentation structure of eWeb. (If was put somewhere in-between header table open and close tags, that will break netForum page structure that entirely consist from tables…)
- Example of the SharePoint master page code that describes a header built using Divisions is enclosed.
- The same rules apply to the footer.
- JavaScript needed by the header and footer should be refrence in an include file and not written directly to eWeb pages.
- The current Web Wrapper implementation is in partnership with SusQTech. Abila only provides the baseline web calls to retrieve the wrapper for the header and footer. Clients must work with SusQTech or develop their own web service that matches the baseline web methods and signatures.
Troubleshooting
- The viewstate should never be included in the Header that is sent to eWeb
- The look and feel may need to modified to satisfy both environments, including CSS modification and JavaScript modification
- If SSL is implemented on one of the sites with the wrapper, either the SharePoint site or eWeb, then it is recommended that both of the sites implement SSL. This will avoid the issue of the user repeatedly being asked if they want to display non-secure items.
- Behavioral scripts may be site specific and may not behave consistently between eWeb and SharePoint.
- There is usually some CSS conflict between the sites, so some modification of the presentation and styles of netFORUM eWeb should be anticipated.