C# 클래스 Upac.Core.Utilities.XsltExtension

파일 보기 프로젝트 열기: 1508/upac-for-umbraco

공개 메소드들

메소드 설명
Clip ( string text, int maxLength, bool ellipsis ) : string

Clips the specified text if the text is bigger than the maxLength provided.

CreateEmptyIterator ( ) : XPathNodeIterator

Creates the empty iterator. Used only internel by this class

CreateForLoop ( int to ) : XPathNodeIterator

Creates XML that can be used as a foor loop. Starting from 1 and to the provided to parameter.

CreateForLoop ( int from, int to ) : XPathNodeIterator

Creates XML that can be used as a foor loop. Starting from parameter from and to the provided to parameter.

CreateRfc822Date ( string isodate ) : string

Returns the RFC822 datetime format for the specified isodate. RFC822 should be used when generating rss feeds etc

FetchFeedAndNormaliseToAtom ( string url ) : XPathNodeIterator

Fetches a external rss/atom feed and normalise it to atom schema.

FormatIsoDate ( string isodate, string fieldNameInSettings ) : string

Formats the iso date.

FormatIsoDateLong ( string isodate ) : string

Formats the iso date long.

FormatIsoDateShort ( string isodate ) : string

Formats the iso date short.

FormatIsoDateTime ( string isodate ) : string

Formats the iso to date and time.

FormatIsoTime ( string isodate ) : string

Formats the iso to time.

GetCurrentCultureName ( ) : string

Gets the name of the current culture.

GetDescendantsViaXPath ( XPathNodeIterator from, string xpath ) : XPathNodeIterator
GetDictionaryItem ( string key ) : string

Gets a dictionary item from Umbraco. If querystring parameter debug exists a debug span is also provided.

GetFileExtension ( string filename ) : string

Gets the file extension.

GetHomeNode ( ) : XPathNodeIterator

Gets the home node.

GetImageTag ( string imagePathOrMediaId ) : string

Gets an xhtml image tag via the provided media id or image path.

GetImageTag ( string imagePathOrMediaId, int maxWidth ) : string

Gets an xhtml image tag via the provided media id or image path

GetImageTag ( string imagePathOrMediaId, int maxWidth, int maxHeight ) : string
GetImageTag ( string imagePathOrMediaId, int maxWidth, int maxHeight, bool constrain ) : string
GetLinkTag ( string nodeId ) : string

Get a link tag

Gets a link tag where the href points to the node and text will come from GetMenuTitle

GetLinkTag ( string nodeId, string linkText ) : string

Get a link tag with overload for the link text

Gets a link tag where the href points to the node and you have provided the link text

GetLinkTag ( string nodeId, string linkText, string cssClass ) : string

Get a link tag with overload for the link text and a css class to add to the a tag.

Gets a link tag where the href points to the node and you can add a css class

GetMediaPath ( int mediaId ) : string

Gets the media path via a media id

GetOEmbedHtml ( string url, string maxWidth, string maxHeight ) : string

Gets the OEmbed HTML.

GetReadableFileSizeViaBytes ( string bytes ) : string

Gets the readable file size via bytes.

GetTemplateIdFromAlias ( string templateAlias ) : int
GetThumbnailUrl ( string imagePathOrMediaId, int width ) : string
GetThumbnailUrl ( string imagePathOrMediaId, int width, int height ) : string
GetThumbnailUrl ( string imagePathOrMediaId, int width, int height, bool constrain ) : string
IsInUpacDebug ( ) : bool
IsoDateNow ( ) : string
MenuInclude ( XPathNodeIterator ni ) : bool

A simple method which returns true if the node should be included in navigations. The following things must be true 1. The node must not have set the property hideFromNavigation true. 2. The node must have a template associated

MenuTitle ( XPathNodeIterator ni ) : string
ToBool ( string input ) : bool

Converts a string to a bool. If the input string is equal 1 true is returned otherwise false.

ToNumber ( string input, int defaultNumber ) : int

Converts a string to a number. If the input string is empty or can not be converted, the defaultNumber is returned instead.

UrlViaNodeId ( string nodeId ) : string

Get the url to a node via node id.

This method also handles redirect nodes which can point to internal or external pages.

UrlViaNodeId ( string nodeId, string alternateTemplate ) : string

Get the url to a node via node id and appending the provided alternate template

UrlViaNodeId ( string nodeId, string alternateTemplate, bool includeDomain ) : string

Get the url to a node via node id and appending the provided alternate template and can include the domain incl. http://

비공개 메소드들

메소드 설명
GetImageTag ( string imagePath, string altText ) : string

메소드 상세

Clip() 공개 정적인 메소드

Clips the specified text if the text is bigger than the maxLength provided.
public static Clip ( string text, int maxLength, bool ellipsis ) : string
text string The text to be clipped.
maxLength int Max length of the returned string.
ellipsis bool if set to true show ellipsis (...)
리턴 string

CreateEmptyIterator() 공개 정적인 메소드

Creates the empty iterator. Used only internel by this class
public static CreateEmptyIterator ( ) : XPathNodeIterator
리턴 System.Xml.XPath.XPathNodeIterator

CreateForLoop() 공개 정적인 메소드

Creates XML that can be used as a foor loop. Starting from 1 and to the provided to parameter.
public static CreateForLoop ( int to ) : XPathNodeIterator
to int ending point
리턴 System.Xml.XPath.XPathNodeIterator

CreateForLoop() 공개 정적인 메소드

Creates XML that can be used as a foor loop. Starting from parameter from and to the provided to parameter.
public static CreateForLoop ( int from, int to ) : XPathNodeIterator
from int Start int
to int End int
리턴 System.Xml.XPath.XPathNodeIterator

CreateRfc822Date() 공개 정적인 메소드

Returns the RFC822 datetime format for the specified isodate. RFC822 should be used when generating rss feeds etc
public static CreateRfc822Date ( string isodate ) : string
isodate string
리턴 string

FetchFeedAndNormaliseToAtom() 공개 정적인 메소드

Fetches a external rss/atom feed and normalise it to atom schema.
public static FetchFeedAndNormaliseToAtom ( string url ) : XPathNodeIterator
url string The external URL for the feed to fetch.
리턴 System.Xml.XPath.XPathNodeIterator

FormatIsoDate() 공개 정적인 메소드

Formats the iso date.
public static FormatIsoDate ( string isodate, string fieldNameInSettings ) : string
isodate string The isodate.
fieldNameInSettings string The field name in settings.
리턴 string

FormatIsoDateLong() 공개 정적인 메소드

Formats the iso date long.
public static FormatIsoDateLong ( string isodate ) : string
isodate string The isodate.
리턴 string

FormatIsoDateShort() 공개 정적인 메소드

Formats the iso date short.
public static FormatIsoDateShort ( string isodate ) : string
isodate string The isodate.
리턴 string

FormatIsoDateTime() 공개 정적인 메소드

Formats the iso to date and time.
public static FormatIsoDateTime ( string isodate ) : string
isodate string The isodate.
리턴 string

FormatIsoTime() 공개 정적인 메소드

Formats the iso to time.
public static FormatIsoTime ( string isodate ) : string
isodate string The isodate.
리턴 string

GetCurrentCultureName() 공개 정적인 메소드

Gets the name of the current culture.
public static GetCurrentCultureName ( ) : string
리턴 string

GetDescendantsViaXPath() 공개 정적인 메소드

public static GetDescendantsViaXPath ( XPathNodeIterator from, string xpath ) : XPathNodeIterator
from System.Xml.XPath.XPathNodeIterator
xpath string
리턴 System.Xml.XPath.XPathNodeIterator

GetDictionaryItem() 공개 정적인 메소드

Gets a dictionary item from Umbraco. If querystring parameter debug exists a debug span is also provided.
public static GetDictionaryItem ( string key ) : string
key string The dictionary key
리턴 string

GetFileExtension() 공개 정적인 메소드

Gets the file extension.
public static GetFileExtension ( string filename ) : string
filename string The filename.
리턴 string

GetHomeNode() 공개 정적인 메소드

Gets the home node.
public static GetHomeNode ( ) : XPathNodeIterator
리턴 System.Xml.XPath.XPathNodeIterator

GetImageTag() 공개 정적인 메소드

Gets an xhtml image tag via the provided media id or image path.
public static GetImageTag ( string imagePathOrMediaId ) : string
imagePathOrMediaId string The image path or media id.
리턴 string

GetImageTag() 공개 정적인 메소드

Gets an xhtml image tag via the provided media id or image path
public static GetImageTag ( string imagePathOrMediaId, int maxWidth ) : string
imagePathOrMediaId string The image path or media id.
maxWidth int Max width.
리턴 string

GetImageTag() 공개 정적인 메소드

public static GetImageTag ( string imagePathOrMediaId, int maxWidth, int maxHeight ) : string
imagePathOrMediaId string
maxWidth int
maxHeight int
리턴 string

GetImageTag() 공개 정적인 메소드

public static GetImageTag ( string imagePathOrMediaId, int maxWidth, int maxHeight, bool constrain ) : string
imagePathOrMediaId string
maxWidth int
maxHeight int
constrain bool
리턴 string

GetLinkTag() 공개 정적인 메소드

Get a link tag
Gets a link tag where the href points to the node and text will come from GetMenuTitle
public static GetLinkTag ( string nodeId ) : string
nodeId string The node id.
리턴 string

GetLinkTag() 공개 정적인 메소드

Get a link tag with overload for the link text
Gets a link tag where the href points to the node and you have provided the link text
public static GetLinkTag ( string nodeId, string linkText ) : string
nodeId string The node id.
linkText string The link text.
리턴 string

GetLinkTag() 공개 정적인 메소드

Get a link tag with overload for the link text and a css class to add to the a tag.
Gets a link tag where the href points to the node and you can add a css class
public static GetLinkTag ( string nodeId, string linkText, string cssClass ) : string
nodeId string The node id.
linkText string The link text.
cssClass string Css class
리턴 string

GetMediaPath() 공개 정적인 메소드

Gets the media path via a media id
public static GetMediaPath ( int mediaId ) : string
mediaId int The media id.
리턴 string

GetOEmbedHtml() 공개 정적인 메소드

Gets the OEmbed HTML.
public static GetOEmbedHtml ( string url, string maxWidth, string maxHeight ) : string
url string The OEmbed URL/Source.
maxWidth string Width of the max.
maxHeight string Height of the max.
리턴 string

GetReadableFileSizeViaBytes() 공개 정적인 메소드

Gets the readable file size via bytes.
public static GetReadableFileSizeViaBytes ( string bytes ) : string
bytes string The bytes.
리턴 string

GetTemplateIdFromAlias() 공개 정적인 메소드

public static GetTemplateIdFromAlias ( string templateAlias ) : int
templateAlias string
리턴 int

GetThumbnailUrl() 공개 정적인 메소드

public static GetThumbnailUrl ( string imagePathOrMediaId, int width ) : string
imagePathOrMediaId string
width int
리턴 string

GetThumbnailUrl() 공개 정적인 메소드

public static GetThumbnailUrl ( string imagePathOrMediaId, int width, int height ) : string
imagePathOrMediaId string
width int
height int
리턴 string

GetThumbnailUrl() 공개 정적인 메소드

public static GetThumbnailUrl ( string imagePathOrMediaId, int width, int height, bool constrain ) : string
imagePathOrMediaId string
width int
height int
constrain bool
리턴 string

IsInUpacDebug() 공개 정적인 메소드

public static IsInUpacDebug ( ) : bool
리턴 bool

IsoDateNow() 공개 정적인 메소드

public static IsoDateNow ( ) : string
리턴 string

MenuInclude() 공개 정적인 메소드

A simple method which returns true if the node should be included in navigations. The following things must be true 1. The node must not have set the property hideFromNavigation true. 2. The node must have a template associated
public static MenuInclude ( XPathNodeIterator ni ) : bool
ni System.Xml.XPath.XPathNodeIterator The node to check.
리턴 bool

MenuTitle() 공개 정적인 메소드

public static MenuTitle ( XPathNodeIterator ni ) : string
ni System.Xml.XPath.XPathNodeIterator
리턴 string

ToBool() 공개 정적인 메소드

Converts a string to a bool. If the input string is equal 1 true is returned otherwise false.
public static ToBool ( string input ) : bool
input string The input to be converted
리턴 bool

ToNumber() 공개 정적인 메소드

Converts a string to a number. If the input string is empty or can not be converted, the defaultNumber is returned instead.
public static ToNumber ( string input, int defaultNumber ) : int
input string The input to be converted
defaultNumber int The default number to return if the input can not be converted.
리턴 int

UrlViaNodeId() 공개 정적인 메소드

Get the url to a node via node id.
This method also handles redirect nodes which can point to internal or external pages.
public static UrlViaNodeId ( string nodeId ) : string
nodeId string The node id.
리턴 string

UrlViaNodeId() 공개 정적인 메소드

Get the url to a node via node id and appending the provided alternate template
public static UrlViaNodeId ( string nodeId, string alternateTemplate ) : string
nodeId string The node id.
alternateTemplate string The alternate template.
리턴 string

UrlViaNodeId() 공개 정적인 메소드

Get the url to a node via node id and appending the provided alternate template and can include the domain incl. http://
public static UrlViaNodeId ( string nodeId, string alternateTemplate, bool includeDomain ) : string
nodeId string The node id.
alternateTemplate string The alternate template. May be empty.
includeDomain bool if set to true include domain and http.
리턴 string