86 Community-Gadgets: Enabling SEO Support for Community Widgets

This chapter provides information about SEO support and instructions on how to enable SEO support for your website.

This chapter contains the following sections:

86.1 Overview

Community widget tags are based on JavaScript code. A browser that is set to disable JavaScript does not display any community widgets. Enabling SEO support ensures that visitors' comments and reviews are visible in browsers set to disable JavaScript. However, visitors are limited to having read-only access to comments and reviews. All other widgets and widget functionality remain hidden.

Additionally, SEO support enables search engines such as Google to look for search terms within the content of your website's comments and reviews. If a comment or review contains a search term, the search engine will display a link to the web page, on which that comment or review was posted, in its search results list.

86.2 Enabling SEO Support

The fields used to enable SEO support are located at the bottom of the Comments and Reviews widget tag custom deployment screens. Below shows the SEO fields in the Comments widget tag's deployment screen (the Reviews widget tag's custom deployment screen contains the same SEO field):

Description of cosusr_app_seosupp1.png follows
Description of the illustration cosusr_app_seosupp1.png

To enable SEO support

  1. Access the custom deployment screen for either the Comments or Reviews widget tag. In the menu bar, do one of the following:

    • To access the custom Comments Deployment screen, select Comments, Deploy, Comments, and then select Custom Settings.

    • To access the custom Reviews Deployment screen, select Reviews, Deploy, Reviews, and then select Custom Settings.

  2. In the Resource ID field, specify a resource ID for the Comments or Reviews widget. The Server-Side Tag for SEO inherits the specified resource ID.

  3. Place the cos-widget-tag.jar file in the application server's classpath (for example, WEB-INF/lib):

    1. In the Widget Tag field, click Download the SEO Widget file to download the SEO widget file (cos-widget-tag.jar).

    2. Place the SEO widget file (cos-widget-tag.jar) into the application server's classpath.

      This jar file defines the functionality of the Server-Side Tag for SEO. Without this jar file, SEO support cannot be enabled.

  4. Deploy the Server-Side Tag for SEO on the page on which the Comments (or Reviews) widget is deployed:

    1. In the Server-Side Tag for SEO field, copy (Ctrl+C) the tag.

    2. Access the template into which you inserted the Comments (or Reviews) widget tag and insert the Server-Side Tag for SEO field directly below the Comments (or Reviews) widget tag. For instructions, see the Oracle Fusion Middleware WebCenter Sites User's Guide.

      The Server-Side Tag for SEO is the main tag that enables SEO support for your web pages.

  5. Deploy the CSS Tag for SEO. This tag is required to display the web page's comments and reviews in the proper layout when a visitor's browser is set to disable JavaScript. Do the following:

    1. In the CSS Tag for SEO field, copy (Ctrl+C) the tag.

    2. Access the template into which you inserted the Comments (or Reviews) widget tag and insert the CSS Tag for SEO between the <head></head> tags of the template's source code. For instructions, see the Oracle Fusion Middleware WebCenter Sites User's Guide.

      The CSS Tag for SEO inherits the appearance settings that are configured for the Comments and Reviews widgets. When deployed, this tag applies JavaScript formatting to the comments and reviews listed on the web page.

  6. Publish the template. For instructions, see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.

  7. Verify that you have enabled SEO support properly. Using a browser set to disable JavaScript, access the website and view a web page on which a Comments (or Reviews) widget is deployed.