Function library for umbraco. Includes various helper-methods and methods to save and load data from umbraco. Especially usefull in XSLT where any of these methods can be accesed using the umbraco.library name-space. Example: <xsl:value-of select="umbraco.library:NiceUrl(@id)"/>

The following tables list the members exposed by the library type.

Public Methods

  NameDescription
static memberContextKey
Get any value from the current Items collection.

static memberCultureExists
static memberCurrentDate
Get the current date

DateAddOverloaded.
static memberDateDiff
static memberDateGreaterThan
Compare two dates

static memberDateGreaterThanOrEqual
Compare two dates

static memberDateGreaterThanOrEqualToday
Check if a date is greater than or equal today

static memberDateGreaterThanToday
Check if a date is greater than today

static memberFormatDateTime
static memberGetCurrentDomains
Checks with the Assigned domains settings and retuns an array the the Domains matching the node

static memberGetCurrentMember
Get the current member as an xml node

static memberGetDictionaryItem
static memberGetDictionaryItems
static memberGetHttpItem
Get any value from the current Http Items collection

GetItemOverloaded.
static memberGetMedia
Get a media object as an xml object

static memberGetMember
Get a member as an xml object

static memberGetMemberName
Returns the Member Name from an umbraco member object

static memberGetNodeFromLevel
Helper function to get a value from a comma separated string. Usefull to get a node identifier from a Page's path string

static memberGetPreValueAsString
static memberGetPreValues
static memberGetPropertyTypeName
Returns that name of a generic property

GetRandomOverloaded.
static memberGetRelatedNodes
static memberGetRelatedNodesAsXml
static memberGetWeekDay
Get the day of week from a date matching the current culture settings

static memberGetXmlAll
static memberGetXmlDocument
static memberGetXmlDocumentByUrl
static memberGetXmlNodeById
static memberGetXmlNodeByXPath
static memberGetXmlNodeCurrent
static memberHasAccess
Check if the current user has access to a document

static memberIsLoggedOn
Whether or not the current user is logged in (as a member)

static memberIsProtected
Check if a document object is protected by the "Protect Pages" functionality in umbraco

static memberLastIndexOf
LongDateOverloaded.
static memberLongDateWithDayName
static memberNiceUrl
Returns a string with a friendly url from a node. IE.: Instead of having /482 (id) as an url, you can have /screenshots/developer/macros (spoken url)

static memberNiceUrlFullPath
This method will always add the root node to the path. You should always use NiceUrl, as that is the only one who checks for toplevel node settings in the web.config

PageElement
Returns any element from the currentpage including generic properties

PageId
Returns the identifier of the current page

PageName
Returns the title of the current page

static memberPublishSingleNode
Publishes a Document by adding it to the runtime xml index. Note, prior to this the Document should be marked published by calling Publish(User u) on the document object.

static memberPublishSingleNodeDo
Internal method that shouldn't be used (TODO: Check if it safely can be private) Use umbraco.library.PublishSingleNode instead of this

static memberPythonExecute
Executes the given python expression and returns the standardoutput. The Globals known from python macros are not accessible in this context. Neighter macro or page nor the globals known from python macros are accessible in this context. Only stuff we initialized in site.py can be used.

static memberPythonExecuteFile
Executes the given python script and returns the standardoutput. The Globals known from python macros are not accessible in this context. Neighter macro or page nor the globals known from python macros are accessible in this context. Only stuff we initialized in site.py can be used.

static memberQueryForNode
static memberRemoveFirstParagraphTag
static memberRenderMacroContent
RenderTemplateOverloaded.
static memberReplace
static memberReplaceLineBreaks
static memberRePublishNodes Obsolete.
Re-publishes all nodes under a given node

RePublishNodesDotNetOverloaded.
static memberRequest
Get any value from the current Request collection. Please note that there also specialized methods for Querystring, Form, Servervariables and Cookie collections

static memberRequestCookies
Get any value from the users cookie collection

static memberRequestForm
Get any value from the current Form collection

static memberRequestQueryString
Get any value from the current Querystring collection

static memberRequestServerVariables
Get any element from the server variables collection

static memberSendMail
Sends an e-mail using the System.Net.Mail.MailMessage object

static memberSession
Get any element from current user session

static memberSessionId
Returns the current ASP.NET session identifier

static membersetSession
Add a session variable to the current user

ShortDateOverloaded.
static memberShortDateWithGlobal
static memberShortDateWithTimeAndGlobal
static memberShortTime
static memberSplit
Split a string into xml elements

static memberStripHtml
static memberTidy
static memberTruncateString
Truncates a string if it's too long

static memberUnPublishSingleNode
Unpublish a node, by removing it from the runtime xml index. Note, prior to this the Document should be marked unpublished by setting the publish propertyon the document object to false

static memberUrlEncode
Urlencodes a string

Public Fields

Public Constructors

  NameDescription
libraryNewOverloaded.