Local Site Links

From Web Developer Network Wiki
Jump to: navigation, search

The template supports custom defined local site links which define various parts of your website. Each of these are defined through a link tag within the head of the document and each can optionally be defined.

NOTE: With the change to HTML5 templates, validation for HTML5 is more strict with LINK REL values. In order to have your HTML5 pages validate, you will need to use a special piece of javascript to provide the same functionality for the link relations that are not valid. Code is provided below. This code is only available since the 3.1 version of the templates.



This link defines the homepage of the current site, and controls which element within the breadcrumbs is associated with the current site navigation.

<link rel="home" href="http://admissions.unl.edu/" title="UNL Admissions home page" />

This link can be either a relative or absolute link.

If no home link is specified, the second element within the breadcrumbs will be selected automatically. If NO breadcrumb element matches the URL specified, the last element in the breadcrumb will be selected.

<script type="text/javascript">
WDN.setPluginParam('navigation', 'siteHomepage', 'http://admissions.unl.edu/');

Localsitelink home.png


This link defines the link to a local calendar using the UNL Event Publishing system.

<link rel="events" href="http://events.unl.edu/wdn/" title="Web Developer Network" />

This link will control the list of local events displayed within the events section of the global tools and the default calendar used in the upcoming and month events widgets. Localsitelink events.png

HTML 5 Code

<script type="text/javascript">
WDN.setPluginParam('events', 'href', 'http://events.unl.edu/wdn/');
WDN.setPluginParam('events', 'title', 'Web Developer Network');


This defines a local site search page to direct the end user to when they search your local site.

<link rel="search" href="http://wdn.unl.edu/search/" title="Search the WDN Site" />

If no local site search is specified, the default search engine is http://www1.unl.edu/search/?u={referring_site}&q={user_query}

The u parameter should reference a UNL template-based website from which various pieces of content will be automatically retrieved, and a Google Custom Search engine will be created on-the-fly to generate results under the specified domain. The value of u can be customized by setting the rel="home" local site link if specified.

The WDN search engine can also take a cx parameter which defines a Google Custom Search Engine key for the local site result panel.

To use your own custom search engine for the local results, you should use a local site link along the lines of:

<link rel="search" href="http://www1.unl.edu/search/?u=http://wdn.unl.edu/&cx=000150017203523626721:-1etga1qfci" />

alternate (rss)

The alternate link specifies an alternate representation of the current page, or related pages for use in an RSS or Feed reader. This also allows the local RSS feed to be linked within the browser's address bar as well as within a column of the RSS feeds displayed within the global site tools.

<link rel="alternate" type="application/rss+xml" href="http://www1.unl.edu/iimblog/feed/" title="Internet & Interactive Media" />

Localsitelink rss.png


The logout link allows customizing the CAS/Single Sign On logout link that is displayed at the top of the UNL template.

<link rel="logout" href="http://myapp.unl.edu/?logout" title="Log out of myapp" />

HTML5 Code

<script type="text/javascript">
WDN.setPluginParam('idm', 'logout', 'http://myapp.unl.edu/?logout');
WDN.setPluginParam('idm', 'login', 'http://myapp.unl.edu/?login');
Personal tools