Link Provider

  0 rating
CMS;Developers
3/22/2013 3:11:22 AM
4/17/2015 1:40:28 PM
Provider: Sitecore

About

You can use the LinkProvider to ensure that links to Sitecore items:

    * Apply the Rendering.SiteResolving setting in web.config.
    * Apply aliases when possible.
    * Include the trailing slash character ("/") when possible.
    * Convert links to lowercase.
    * Include the language in paths in URLs for some sites, but not others. 


Last documented compile: Sitecore 6.0.1 090212

WARNING: At least for some features, this component requires more compute resources than the default link provider implementation. If you use this approach, stress-test the solution, and consider contributing enhancements that improve performance to this project.

NOTE: This project relies on the Library component. 

Documentation

Documentation
  • Documentation > Getting Started with the Link Provider
    Getting Started with the Link Provider

    You can use the LinkProvider to ensure that links to Sitecore items:

        * Apply the Rendering.SiteResolving setting in web.config.
        * Apply aliases when possible.
        * Include the trailing slash character ("/") when possible.
        * Convert links to lowercase.
        * Include the language in paths in URLs for some sites, but not others.

    For more information about dynamic links, see the ​Content API Cookbook on the ​Sitecore Developer Network.

    NOTE: This project relies on the Library component.

    LinkProvider Configuration

    Set the type attribute of the /configuration/sitecore/linkManager/providers/add element in web.config with name sitecore to the signature of the custom link provider class. As of Sitecore 6.0.1 090212:

    <linkManager defaultProvider="sitecore">
      <providers>
        <clear />
        <add name="sitecore" type="Sitecore.Sharedsource.Links.LinkProvider, Assembly"
          addAspxExtension="..."
          alwaysIncludeServerUrl="..."
          encodeNames="..."
          languageEmbedding="..."
          languageLocation="..."
          shortenUrls="..."
          useDisplayName="...">
          <applySiteResolving>true</applySiteResolving>
          <expandAliases>true</expandAliases>
          <appendSlash>true</appendSlash>
          <lowercase>true</appendSlash>
        </add>
      </providers>
    </linkManager>

    LinkManager Properties

        * The ApplySiteResolving property determines whether the link provider applies the Rendering.SiteResolving setting.
        * The ApplyAliases property of the custom link provider determines whether to apply an alias when possible.
        * The AppendSlash property of the custom link provider determines whether to append a slash to all URLs.
        * The Lowercase property of the custom link provider determines whether to lowercase the path in URLs.

    Site LanguageEmbedding Control

    You can configure different logical sites to include or exclude the language. For example, to configure URLs for the published Web site:

    <site name="website" languageEmbedding="..." ...

    If the languageEmbedding attribute of the site is absent, default Sitecore languageEmbedding logic applies. If the languageEmbedding attribute of the site is true, paths in URLs for that site always include the language. If the languageEmbedding attribute of the site is false, paths in URLs for that site never include the language.

    0
Back
Release notes
The module was added 27-02-2009
Read more Back
Code examples

Solution screenshots(0)

Upload

Reviews (0)

Sort by: Date Most votes
  • Profile Avatar
    [fullName]

    Level: 0

    x0 x0 x0

    [date]

    [title]

    [text]

    Was this helpful?

    0

Comments (0)

Sort by: Date  Most votes

Leave a Comment

Comment must be field in
Post comment
loader

Write a review

Title can't be empty
Review can't be empty
Post review

Download

Title Description Download Action

Add File