Export (0) Print
Expand All

UrlDirName Element (View)

Last modified: May 30, 2008

Applies to: SharePoint Foundation 2010

In this article
Attributes
Child Elements
Parent Elements
Occurrences

Specifies the site-relative URL for the directory that contains a document.


<UrlDirName>
</UrlDirName>

Attribute

Description

None

N/A

Minimum: 0

Maximum: Unbounded

The following example uses the UrlDirName element to construct the absolute URL for a thumbnail image in a picture library.

<DisplayPattern>
   <HttpHost />
   <UrlDirName>
      <HTML>/</HTML>
      <LookupColumn URLEncodeAsURL="TRUE" Name="FileRef" />
   </UrlDirName>
   <HTML>/_t/</HTML>
   <UrlBaseName>
      <Field Name="EncodedAbsUrl" />
   </UrlBaseName>
   <HTML>_</HTML>
   <GetFileExtension>
      <Field Name="EncodedAbsUrl" />
   </GetFileExtension>
   <HTML>.jpg</HTML>
</DisplayPattern>

If the image file has a .jpg extension and is contained in a picture library on a subsite, the example creates a URL in the following form:

http://Server_Name/Subsite_Name/Library_Name/_t/File_Base_Name/_jpg.jpg

Show:
© 2015 Microsoft