PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Write links to web content
+

Search Tips   |   Advanced Search

URL links to web content

  1. Link to web content from other web content
  2. Link to web content from an external portlet or website
  3. Link to content displayed in a web content viewer from an external portlet or website
  4. Add cache parameters to a URL
  5. Add a last modified parameter to a URL
  6. Overriding the context mode
  7. Other URL Parameters


Link to web content from other web content

Create a link from a piece of web content to another piece of web content:

    [URLCmpnt mode="current" context="Selected" type="Content" name="library/site_area_path/content"]

...where...

    Parameter Description Example
    library The name of the web content library.
    site_area_path The path to the site area where the content is located.
    content The name of the content item.


Link to web content from an external portlet or website

To create a link from an external portlet or website that displays web content:

    http://hostname/context_root/library/site_area_path/content

    Parameter Description Example
    hostname The name of the WCM host.
    context_root The WCM context root. wps/wcm/connect
    library The name of the web content library.
    site_area_path The path to the site area where the content is located.
    content The name of the content item.


Link to content displayed in a web content viewer from an external portlet or website

To create a link from an external portlet or website to content displayed in a web content viewer, use one of the following piece of content (POC) URIs:

    Parameter Description Example
    wcm:path:content_path POC URI to link to the content with the specified path. /Web Content/Articles/Sample Article
    wcm:oid:content_id POC URI to link to the content with the specified ID. fa2bfd32-7b2f-4394-a5ab-2e150c5ed8aa

Use one of the POC URIs to create a URL with the following format:

    http://hostname/context_root/mypoc/virtual_portal_context?urile=poc_uri

The POC URI needs to be URL encoded.

    For example:

      http://myportal/wps/mypoc/myvp?urile=wcm%3Apath%3A/Web+Content/Articles/Sample+Article

    We can add query parameters to the URL to specify how the portal resolves the POC URI.

    To address a specific portal page, use one of the following parameters. The parameters cannot be combined:

      Parameter Description Example
      page Unique name or the object ID of the target page. &page=my.content.page
      mapping Target page using a URL mapping. &mapping=myContentPage
      current The current page is the target page. &current=true

    To use a specific presentation template to render the requested content:

      Parameter Description Example
      pagedesign Path to the presentation template in the web content library including the names of folders. &pagedesign=/Web+Content/My+Templates+Folder/My+Presentation+Template

    To specify a mime type for the Content as a Service feature described in topic Content as a Service:

      Parameter Description Example
      mime-type MIME type used as response content type of a Content as a Service request. Use if we have enabled content for different data formats based on the MIME type. This parameter specifies the content type produced by the design component rendering the requested content. We can either use an element from the content item or a presentation template to produce the output. &mime-type=application/json


Dynamic page lookup

The page parameter is optional. We can use the link broadcasting feature of the web content viewer to dynamically look up pages by omitting the page parameter. For example, if we have a content item News1, stored in the library Web Content under the site area News

    http://hostname/context_root_poc?urile=wcm%3Apath%3A/Web+Content/News/News1

...where...

    Parameter Description Example
    hostname The name of the WCM host.
    context_root_poc The portal context root. wps/poc or wps/mypoc

To add a specific portal page using a URL mapping:

    http://hostname/context_root/portal_page_url_mapping/?current=true&urile=wcm%3Apath%3Alibrary/site_area_path/content

...where...

    Parameter Description Example
    hostname The name of the WCM host.
    context_root Portal context root. anonymous sites can use wps/portal. Otherwise use wps/myportal.
    portal_page_url_mapping Compound name of the portal URL mapping to the portal page containing the WCM portlet (URL mappings can be set up using the portal administration portlets).
    library Name of the web content library.
    site_area_path Path to the site area where the content is located.
    content Name of the content item.

The web content viewer on the target page must be configured to receive links from Other portlets and this portlet.


Add cache parameters to a URL

We can add web content Cache parameters and Cache expire parameters to a URL to custom caching strategies to individual items. For example:

    http://hostname/context_root/library/site_area_path/content?cache=site&contentcache=session

    Parameter Description Example
    hostname The name of the WCM host.
    context_root The WCM context root. wps/wcm/connect
    library The name of the web content library.
    site_area_path The path to the site area where the content is located.
    content The name of the content item.


Add a last modified parameter to a URL

We can add the last modified date of the current content item to the header of the rendered page. For example:

    http://hostname/context_root/library/site_area_path/content?returnLastModified=true

    Parameter Description Example
    hostname The name of the WCM host.
    context_root The WCM context root. wps/wcm/connect
    library The name of the web content library.
    site_area_path The path to the site area where the content is located.
    content The name of the content item.


Overriding the context mode

The urlModeOverride parameter is used to override the default URL context when linking to URL, Link, and Placeholder components. These are the accepted values:

    Parameter Description Example
    current Chooses the URL style based on the request.
    standalone Generates URLs that render outside a portal site, such as a servlet site.
    poc Generates a stateful Portal URL that renders content against the mapped wcm rendering portlet, or a servlet URL if no mapping exists. Functions as 'static' when rendering outside a portal site.
    static Generates a short stateless Portal URL, or a servlet URL if no mapping exists.


Other URL Parameters

    Parameter Description Example
    WCMRenderAbsoluteURLs Add this to a URL to generate an absolute URL of an item instead of the relative URL.


Parent topic: Tags

Related concepts:

Content as a Service pages
Select data format based on MIME type