Skip Headers
Oracle® Universal Content Management
10g Release 4 (10.1.4)
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next

Working With Links

Links provide a convenient way for visitors to navigate from one web page to another. The most common use of a link is in the site navigation, such as a top menu, side menu, breadcrumbs, and so on. In Site Studio, you can instantly create these menus using a navigation fragment (see Navigation Fragments).

There are, however, instances when you may want to create additional links to take users to a specific piece of content. You can add a link to another section of your site, to a contributor data file or native document on your site, to another Web site, and more. You do this using the Link wizard.

In addition to creating links in Designer, you can allow contributors to create and edit links in Contributor. You set this up when you add an element to a contribution region.

The Link wizard takes you through all variations on linking:

Creating a Link to Another Section of the Web Site

To create a link to another section of your Web site or another Site Studio site on the content server, perform these tasks:

  1. Highlight the text (or image) that you would like to turn into a link.

  2. Click the Create Hyperlink icon (Figure) in the toolbar.

    Create Hyperlink Icon

    Create Hyperlink Icon

    The Link wizard is launched (see Link Wizard).

  3. Select Link to a section.

  4. Click Next.


    Note:

    You can step through the wizard faster by clicking the blue arrow to the left of the option you want to use. This automatically selects the option and moves the wizard to the next step.

  5. Choose the section that you would like to link to. This can be a section on the current Web site or a different Site Studio site on the content server. You select the target section in the site hierarchy.

  6. Click Next.

  7. Depending on the site configuration, you may be prompted to choose the URL format of the link:

    • Path Based URL: The link will contain a path to the target location. You have two choices for this type of link:

      • Absolute Path: Generates a full path; for example <!--$ssServerRelativeSiteRoot-->products/index.htm (where "<!--$ssServerRelativeSiteRoot-->" gets replaced with the path to the root of the Web site).

      • Relative Path: Generates a relative path instead of a full path; for example ../products/index.htm.

      Please note that this option is not available if you chose to use the default Web site section for the content file as the target section (see previous step).

    • ID Based URL: The link will contain the coded identity of the target location rather than the path-based name. You have three choices for this type of link:

      • Client Side Script Format: Uses client-side JavaScript to construct a link to the target location; for example, javascript:nodelink('10024');.

      • Server Side Script Format: Uses server-side Idoc Script to construct a link to the target location; for example, [!--$wcmUrl('nodelink','10024')--].

      • URL Token Format: Uses a redirect on the server to construct a link to the target location; for example, ssNODELINK/10024.

  8. Click Options....

    The Link Target Options dialog is displayed.

  9. If you want the link to open in a new web browser window when clicked, select the Open link target in new window check box, and then choose the target in the menu (_blank). You can also directly enter the name of the target in the text box if you want, but if it is not a valid target, the link is faulty.

  10. Click OK or Cancel to return to the wizard.

  11. Click Next.

  12. Verify the URL for the link.

  13. Click Finish.

Creating a Link to an Existing File on the Content Server

You can create a link to an existing content file (contributor data file or native document) on your site or another site in the content server.

To create a link to an existing file on the content server, perform these tasks:

  1. Highlight the text (or image) that you would like to turn into a link.

  2. Click the Create Hyperlink icon (Figure) in the toolbar.

    Create Hyperlink Icon

    Create Hyperlink Icon

    The Link wizard is launched (see Link Wizard).

  3. Select Link to a file.

  4. Click Next.


    Note:

    You can step through the wizard faster by clicking the blue arrow to the left of the option you want to use. This automatically selects the option and moves the wizard to the next step.

  5. Select Existing file from server, and click Next.

    The standard search results page on the content server is displayed, showing all content files associated with the Web site.


    Note:

    The content server query from the link wizard is an open query in Designer. In Contributor, the query is more controlled.

  6. Click Select next to the file you want to link to.

  7. Choose the target section for the link. You can choose from the following options:

    • Use default website section metadata: If you choose this option, the hyperlinked content file will display in the Web site section as currently specified in the Web Site Section metadata field for the content file.

    • Choose a website section: If you choose this option, the hyperlinked content file will display in the Web site section of your choice (in effect overriding the default target section of the content file). The section may be in the current Web site or another Site Studio site on the content server.

    • Link to the Content Item's URL: If you choose this option, the file will display exactly as it is stored on the content server rather than within the framework of the Web site. This is useful for linking to native documents such as PDF files.

    Click Next to continue.

  8. Depending on the site configuration, you may be prompted to choose the URL format of the link:

    • Path Based URL: The link will contain a path to the target location. You have two choices for this type of link:

      • Absolute Path: Generates a full path; for example <!--$ssServerRelativeSiteRoot-->Menus/switched_region_CDF (where "<!--$ssServerRelativeSiteRoot-->" gets replaced with the path to the root of the Web site).

      • Relative Path: Generates a relative path instead of a full path; for example ../Menus/switched_region_CDF.

      Please note that this option is not available if you chose to use the default Web site section for the content file as the target section (see previous step).

    • ID Based URL: The link will contain the coded identity of the target location rather than the path-based name. You have three choices for this type of link:

      • Client Side Script Format: Uses client-side JavaScript to construct a link to the target location; for example, javascript:link('switched_region_CDF');.

      • Server Side Script Format: Uses server-side Idoc Script to construct a link to the target location; for example, <!--$wcmUrl("link","switched_region_CDF")-->.

      • URL Token Format: Uses a redirect on the server to construct a link to the target location; for example, ssLINK/switched_region_CDF.

  9. Click Options....

    The Link Target Options dialog is displayed.

  10. If you want the link to open in a new web browser window when clicked, select the Open link target in new window check box, and then choose the target in the menu (_blank). You can also directly enter the name of the target in the text box if you want, but if it is not a valid target, the link is faulty.

  11. Click OK or Cancel to return to the wizard.

  12. Click Next.

  13. Verify the URL for the link.

  14. Click Finish.

Creating a Link to a URL

You can create a link to a specific URL (web address); for example, an Internet Web site or a file on the content server (one not used for contribution, such as a PDF file, media file, or zip file).

To create a link to a specific URL, perform these tasks:

  1. Highlight the text (or image) that you would like to turn into a link.

  2. Click the Create Hyperlink icon (Figure) in the toolbar.

    Create Hyperlink Icon

    Create Hyperlink Icon

    The Link wizard is launched (see Link Wizard).

  3. Select Link to following URL.

  4. Enter the web address in the field provided (for example, http://www.oracle.com).

    You cannot proceed in the wizard until you provide a URL.

  5. Click Options....

    The Link Target Options dialog is displayed.

  6. If you want the link to open in a new web browser window when clicked, select the Open link target in new window check box, and then choose the target in the menu (_blank). You can also directly enter the name of the target in the text box if you want, but if it is not a valid target, the link is faulty.


    Note:

    When creating a link to another Web site, the "Open link target in new window" option may be useful because it prevents users from inadvertently leaving your Web site when they click the link.

  7. Click OK or Cancel to return to the wizard.

  8. Click Next.

  9. Verify the URL for the link.

  10. Click Finish.

Creating a Link to a New Content File

You can create a link to a new content file (contributor data file or native document), which is checked into the content server as a managed site asset.

To create a link to a new content file, perform these tasks:

  1. Highlight the text (or image) that you would like to turn into a link.

  2. Click the Create Hyperlink icon (Figure) in the toolbar.

    Create Hyperlink Icon

    Create Hyperlink Icon

    The Link wizard is launched (see Link Wizard).

  3. Select Link to a file.

  4. Click Next.


    Note:

    You can step through the wizard faster by clicking the blue arrow to the left of the option you want to use. This automatically selects the option and moves the wizard to the next step.

  5. Select either New Contributor data file or New native file, depending on which type of file you want to add. For a new native document, also select the file format from the menu. The site designer decides what file formats are allowed for new native documents.

  6. Click Next.

    The standard content check-in page on the content server is displayed.

  7. Enter the appropriate content information (metadata) to check the item into the content server. Much of the information is automatically provided. If a field name is marked red, then the field is required (that is, the item cannot be checked in if the field is empty). Please note that the new contributor data file or native document is empty until it is edited, usually by a contributor.

    Click Next when you are done.

  8. Choose the target section for the link. You can choose from the following options:

    • Use default website section metadata: If you choose this option, the hyperlinked content file will display in the Web site section as currently specified in the Web Site Section metadata field for the content file.

    • Choose a website section: If you choose this option, the hyperlinked content file will display in the Web site section of your choice (in effect overriding the default target section of the content file). The section may be in the current Web site or another Site Studio site on the content server.

    • Link to the Content Item's URL: If you choose this option, the file will display exactly as it is stored on the content server rather than within the framework of the Web site. This is useful for linking to native documents such as PDF files.

    Click Next to continue.

  9. Depending on the site configuration, you may be prompted to choose the URL format of the link:

    • Path Based URL: The link will contain a path to the target location. You have two choices for this type of link:

      • Absolute Path: Generates a full path; for example <!--$ssServerRelativeSiteRoot-->Menus/switched_region_CDF (where "<!--$ssServerRelativeSiteRoot-->" gets replaced with the path to the root of the Web site).

      • Relative Path: Generates a relative path instead of a full path; for example ../Menus/switched_region_CDF.

      Please note that this option is not available if you chose to use the default Web site section for the content file as the target section (see previous step).

    • ID Based URL: The link will contain the coded identity of the target location rather than the path-based name. You have three choices for this type of link:

      • Client Side Script Format: Uses client-side JavaScript to construct a link to the target location; for example, javascript:link('switched_region_CDF');.

      • Server Side Script Format: Uses server-side Idoc Script to construct a link to the target location; for example, <!--$wcmUrl("link","switched_region_CDF")-->.

      • URL Token Format: Uses a redirect on the server to construct a link to the target location; for example, ssLINK/switched_region_CDF.

  10. Click Options....

    The Link Target Options dialog is displayed.

  11. If you want the link to open in a new web browser window when clicked, select the Open link target in new window check box, and then choose the target in the menu (_blank). You can also directly enter the name of the target in the text box if you want, but if it is not a valid target, the link is faulty.

  12. Click OK or Cancel to return to the wizard.

  13. Click Next.

  14. Verify the URL for the link.

  15. Click Finish.

Creating a Link to an Existing File on the Content Server

You can create a link to an existing content file (contributor data file or native document) on your site or another site in the content server.

To create a link to an existing file on the content server, perform these tasks:

  1. Highlight the text (or image) that you would like to turn into a link.

  2. Click the Create Hyperlink icon (Figure) in the toolbar.

    Create Hyperlink Icon

    Create Hyperlink Icon

    The Link wizard is launched (see Link Wizard).

  3. Select Link to a file.

  4. Click Next.


    Note:

    You can step through the wizard faster by clicking the blue arrow to the left of the option you want to use. This automatically selects the option and moves the wizard to the next step.

  5. Select Existing file from server, and click Next.

    The standard search results page on the content server is displayed, showing all content files that are currently associated with the Web site.

  6. Click Select next to the file you want to link to.

  7. Choose the target section for the link. You can choose from the following options:

    • Use default website section metadata: If you choose this option, the hyperlinked content file will display in the Web site section as currently specified in the Web Site Section metadata field for the content file.

    • Choose a website section: If you choose this option, the hyperlinked content file will display in the Web site section of your choice (in effect overriding the default target section of the content file). The section may be in the current Web site or another Site Studio site on the content server.

    • Link to the Content Item's URL: If you choose this option, the file will display exactly as it is stored on the content server rather than within the framework of the Web site. This is useful for linking to native documents such as PDF files.

    Click Next to continue.

  8. Depending on the site configuration, you may be prompted to choose the URL format of the link:

    • Path Based URL: The link will contain a path to the target location. You have two choices for this type of link:

      • Absolute Path: Generates a full path; for example <!--$ssServerRelativeSiteRoot-->Menus/switched_region_CDF (where "<!--$ssServerRelativeSiteRoot-->" gets replaced with the path to the root of the Web site).

      • Relative Path: Generates a relative path instead of a full path; for example ../Menus/switched_region_CDF.

      Please note that this option is not available if you chose to use the default Web site section for the content file as the target section (see previous step).

    • ID Based URL: The link will contain the coded identity of the target location rather than the path-based name. You have three choices for this type of link:

      • Client Side Script Format: Uses client-side JavaScript to construct a link to the target location; for example, javascript:link('switched_region_CDF');.

      • Server Side Script Format: Uses server-side Idoc Script to construct a link to the target location; for example, <!--$wcmUrl("link","switched_region_CDF")-->.

      • URL Token Format: Uses a redirect on the server to construct a link to the target location; for example, ssLINK/switched_region_CDF.

  9. Click Options....

    The Link Target Options dialog is displayed.

  10. If you want the link to open in a new web browser window when clicked, select the Open link target in new window check box, and then choose the target in the menu (_blank). You can also directly enter the name of the target in the text box if you want, but if it is not a valid target, the link is faulty.

  11. Click OK or Cancel to return to the wizard.

  12. Click Next.

  13. Verify the URL for the link.

  14. Click Finish.

Creating a Link to an Existing Local File

You can create a link to an existing local file (that is, on your own computer), which is checked into the content server as a managed site asset.

To create a link to an existing local file, perform these tasks:

  1. Highlight the text (or image) that you would like to turn into a link.

  2. Click the Create Hyperlink icon (Figure) in the toolbar.

    Create Hyperlink Icon

    Create Hyperlink Icon

    The Link wizard is launched (see Link Wizard).

  3. Select Link to a file.

  4. Click Next.


    Note:

    You can step through the wizard faster by clicking the blue arrow to the left of the option you want to use. This automatically selects the option and moves the wizard to the next step.

  5. Select Existing local file, and click Next.

    The standard content check-in page on the content server is displayed.

  6. Enter the appropriate content information (metadata) to check the item into the content server. Much of the information is automatically provided. If a field name is marked red, then the field is required (that is, the item cannot be checked in if the field is empty). Use the Browse button next to the Primary File field to navigate to the file on your computer and select it. Also, make sure to specify a title.

    Click Next when you are done.

  7. Choose the target section for the link. You can choose from the following options:

    • Use default website section metadata: If you choose this option, the hyperlinked content file will display in the Web site section as currently specified in the Web Site Section metadata field for the content file.

    • Choose a website section: If you choose this option, the hyperlinked content file will display in the Web site section of your choice (in effect overriding the default target section of the content file). The section may be in the current Web site or another Site Studio site on the content server.

    • Link to the Content Item's URL: If you choose this option, the file will display exactly as it is stored on the content server rather than within the framework of the Web site. This is useful for linking to native documents such as PDF files.

    Click Next to continue.

  8. Depending on the site configuration, you may be prompted to choose the URL format of the link:

    • Path Based URL: The link will contain a path to the target location. You have two choices for this type of link:

      • Absolute Path: Generates a full path; for example <!--$ssServerRelativeSiteRoot-->Menus/switched_region_CDF (where "<!--$ssServerRelativeSiteRoot-->" gets replaced with the path to the root of the Web site).

      • Relative Path: Generates a relative path instead of a full path; for example ../Menus/switched_region_CDF.

      Please note that this option is not available if you chose to use the default Web site section for the content file as the target section (see previous step).

    • ID Based URL: The link will contain the coded identity of the target location rather than the path-based name. You have three choices for this type of link:

      • Client Side Script Format: Uses client-side JavaScript to construct a link to the target location; for example, javascript:link('switched_region_CDF');.

      • Server Side Script Format: Uses server-side Idoc Script to construct a link to the target location; for example, <!--$wcmUrl("link","switched_region_CDF")-->.

      • URL Token Format: Uses a redirect on the server to construct a link to the target location; for example, ssLINK/switched_region_CDF.

  9. Click Options....

    The Link Target Options dialog is displayed.

  10. If you want the link to open in a new web browser window when clicked, select the Open link target in new window check box, and then choose the target in the menu (_blank). You can also directly enter the name of the target in the text box if you want, but if it is not a valid target, the link is faulty.

  11. Click OK or Cancel to return to the wizard.

  12. Click Next.

  13. Verify the URL for the link.

  14. Click Finish.

Editing a Hyperlink

After you add a hyperlink, you can edit the link by highlighting it and opening the Link Wizard.

To edit a hyperlink, perform these tasks:

  1. In the page template, place your cursor on the text or graphic that is serving as a hyperlink.

  2. Click the Create Hyperlink icon (Figure) in the Formatting toolbar.

    Create Hyperlink Icon

    Create Hyperlink icon
  3. This opens the Link Wizard, where you can go through and change the hyperlink in the same way that you added it.

  4. Click Finish to close the wizard and return to the page template.

You can also edit a hyperlink by placing your cursor on the text or graphic that is serving as the link and editing the href attribute in the Properties pane.

Removing a Link

After you add a link using the Link wizard, you can easily remove it at any time, by performing these tasks:

  1. Place your mouse cursor anywhere in the hyperlinked text (or highlight the text).

  2. Click the Remove Hyperlink icon (Figure) in the toolbar.

    The hyperlink is removed from the text.

    Remove Hyperlink Icon

    Remove Hyperlink Icon

Choosing a Default Link Format

When you create a hyperlink using the Link wizard, you have numerous choices regarding the format of the link. The format is the way the link is assembled. The link can use a path-based URL or an ID-based URL to locate the target location.

Within each format, there are even more choices (for example, relative paths, client-side IDs, server-side IDs, and so on). There are benefits and drawbacks to each one (see Hyperlink Formats). As such, you may want to choose a default format and then hide this option in the Link wizard; for both designers and contributors.

To choose a default link format, perform these tasks:

  1. Click File then select Site, then select Advanced and then Set Default Link Format.

    This opens the Choose Default Link Format dialog (see Choose Default Link Format Dialog).

  2. Choose Path-based URL if you want the link to use a path to the target location:

    • Absolute path: Generates a full path; for example <!--$ssServerRelativeSiteRoot-->products/index.htm (where "<!--$ssServerRelativeSiteRoot-->" gets replaced with the path to the root of the Web site).

    • Relative path: Check this to generate a relative path instead of a full path; for example ../products/index.htm.

  3. Choose ID-based URL if you want the link to use the hard-coded ID of the target location without referencing a section name or label:

    • Choose Client Side javascript:link() / javascript:nodelink() format if you want the link to use client-side JavaScript and the ID of the target location.

    • Choose Server Side wcmUrl() format if you want the link to use server-side Idoc Script and the ID of the target location.

    • Choose URL Token ssLINK / ssNODELINK format if you want the link to use a Site Studio token and the ID of the target location.

  4. Check Hide the "Choose Format" page in the Link Wizard to prevent this option from appearing when you create links in Designer.

  5. Check Hide the "Choose Format" page in the Link Wizard to prevent this option from appearing when you create links in Contributor.

  6. Click OK.

You might hide the "Choose Format" screen in the Link wizard for several reasons (for example, to prevent user confusion, to prevent undesired linking choices by the user, or to enforce consistency for the hyperlinks on your site).

Hyperlink Formats

When you create a hyperlink, you have numerous choices regarding the format of the link. The format is the way the link is assembled. You can choose a path-based URL for the link or an ID-based URL for the link.

If you choose path-based, then you can choose between a full path or a relative path. If you choose ID-based, then you can choose between client-side script, server-side script, or a special token provided by Site Studio.

There are advantages and disadvantages to each. Please review the following table for a side-by-side comparison.

Side-By-Side Comparison

Advantages Full Path Rel. Path Server-Side ID Client-Side ID URL Token
Natural site address Yes Yes Yes No No
Hides cryptic siteID and nodeID values Yes Yes Yes No No
Can be indexed by search engines Yes Yes Yes No Yes
Unaffected by site hierarchy changes No No Yes Yes Yes
Works in reused page templates Yes No Yes Yes Yes
Requires no server-side scripting Yes Yes No Yes Yes
Requires no client-side scripting Yes Yes Yes No Yes
Requires no redirects on server Yes Yes Yes No No
Capable of bookmark links Yes Yes Yes No No
Supports passing parameters Yes Yes No No Yes
Can open in popup windows Yes Yes Yes No Yes
Can be used in native documents Yes Yes No Yes Yes

Description of Each Category

Category Description
Natural site address You see a friendly, path-based address in the URL.
Hides cryptic siteID and nodeID values Visitors and contributors viewing the site do not see the cryptic Site Studio technology in the URL.
Can be indexed by search engines Search engines can index the site.
Unaffected by site hierarchy changes You can change the site hierarchy (for example, rename sections or move a section into another one) without affecting your links.
Works in reused page templates You can reuse the page template, data file, or native document throughout the site, and the link still works.
Requires no server-side scripting The Web site does not have to rely on server-side script (for example, Idoc Script).
Requires no client-side scripting The Web site does not have to rely on client-side JavaScript.
Requires no redirects on server The Web site does not have to rely on a server-side redirect that points the ID-based address to a path-based address, which may result in decreased site performance.
Capable of bookmark links You can use the link for bookmark links, which allow the user to link to any part of a web page.
Supports passing parameters You can append, or pass, a parameter to the URL to achieve a desired result.
Can open in a popup window You can use the link to open a new popup window, which requires some scripting.
Can be used in native documents You can use this same format of a link in a native document.