Part 4

NEWS & TIPS

  • Site Access Keys
  • Top: Alt+t
    Previous: Alt+,
    Next: Alt+.
    Up: Alt+;
    (Note: use Ctrl on the Mac)

External Links

Often times there comes a need to incorporate links to external sites within a dynamic navigation menu. Use of system symlinks (external links) provides the perfect mechanism to incorporate such functionality.

Tech intro 4 image 1

External links are also used to tie in other web applications from within the same program interface. For example, you could have an external link to your site visitor statistics and other marketing reporting tools to quickly see the pages inline.

A. Create a New External Link

For this example, you are going to use the /web site created in the previous technical introductions. If you do not have the /web example, the information will still be applicable to integrating external links with your own site.

To create an external link:

  1. Browse to your folder. In our case, we will choose web.
  2. Select New -> Default -> External Link from the top navigation menu.
  3. While in the Content pane, go to the Link field and type http://www.hannonhill.com.
  4. Select the Metadata pane.
  5. For the Display Name field, type Hannon Hill.
  6. Select the System pane.
  7. For the System Name field, type HannonHill.com.
  8. Click Submit to save the new external link.

Tech intro 4 image 2

With the new external link displayed on the screen, you can see it points to the actual location inside the main page frame. For your purposes, you will want to use the link name and location for dynamic display on a navigation menu.

B. Update an Index Block to Include External Links

Now that you have your external link in place, you need to go to the index block for your navigation menus and ensure it includes this type of asset.

To update an existing index block to include external links:

  1. Browse to the existing index block in the system. In our case, we will select /web/blocks/index/context navigation.
  2. Click the Edit tab.
  3. For Indexed Asset Types, check the box for Links (boxes that are already checked should remain checked).
  4. Make sure that Regular Content is checked for Indexed Asset Content.
  5. Click Submit to save the changes.

Tech intro 4 image 3

With this update to the index block, the external links and their link location will be included in the resulting XML document. For our example here, the XML output looks like:

You can now use this data in a new XSLT to generate a navigation menu that has dynamic links to pages and external links.

C. Create XSLT for Navigation with External Links

To create an XSLT that incorporate external links for navigation:

  1. Browse to your stylesheets folder. In our case, we will select /web/stylesheets.
  2. From the top navigation menu, select New -> Default -> Stylesheet.
  3. For the XML field, use the following code:

  4. Select the System pane.
  5. For the System Name field, type link navigation.
  6. Click Submit to save the new stylesheet.

D. Assign a Stylesheet to a Template Region

With the new stylesheet in place, you need to assign it to the appropriate region in the template.

To assign the stylesheet to a template region:

  1. Browse to your template. In our case, we will select /web/templates/standard.
  2. Click the Edit tab, and select the Regions pane.
  3. For the CONTEXT-NAVIGATION region, click the Stylesheet browse icon and choose the new stylesheet. We will select /web/stylesheets/link navigation.
  4. Click Submit to save the updated template.

Tech intro 4 image 4

With the updated template in place, browse to an existing page that uses it. We will select /web/example and see the new navigation menu. The order of the navigation items on the menu is determined by the order of the assets in the folder.

E. Reorder Assets in a Folder

Now, you want to reorder the assets in the folder to see the resulting output on the page.

To reorder assets in a folder:

  1. Browse to the desired folder in the left asset tree. In our case, we will select web.
  2. The assets in a folder will be sorted by default according to System Name. By clicking on the various columns, you can sort the view by Folder Order, Last Modified Date, or Last Modified By User. To make things easier to reorder, go ahead and sort the view by Order.
  3. For each asset in the folder, you will see different up and down arrows. Clicking the double up arrow makes the asset first in the folder. Clicking the double down arrow makes the asset last in the folder. Click the double up arrow on the asset with the highest order number in the folder. In our case, we will click on the double up arrow for the HannonHill.com external link, reordering it from order number twenty-eight to order number one. You will see the new order number reflected in the order column.
  4. With the asset reordered, browse to an existing page that uses the new stylesheet. In our case, we will select /web/example.

Tech intro 4 image 5

The new folder ordering is reflected in the dynamic navigation menu. The order of assets in an index block, translating to the order of the asset in the resulting navigation menu, is typically based on the folder order. The index block is also configurable to sort assets alphabetically, by their last modified date, and by their creation date.

Tech intro 4 image 6

Videos

Last modified on Mon, 14 Jan 2008 13:04:48 -0500

Comments


Top / Previous / Next / Up / Table of Contents