Coder Social home page Coder Social logo

warrenbuckley / umbracoextensionmethods Goto Github PK

View Code? Open in Web Editor NEW
34.0 11.0 12.0 8.63 MB

This is a community project to create a library of Umbraco Extension Methods to use in Razor files.

C# 2.94% ASP 11.26% JavaScript 63.28% CSS 7.29% HTML 13.92% XSLT 1.31%
umbraco umbraco-cms

umbracoextensionmethods's Introduction

Umbraco Community Extension Methods

This is a community project to create a library of Umbraco Extension Methods to use in Razor files and with the ContentService?

##Umbraco Test Site - Details

  • Username: admin
  • Password: password

ASP.NET

  • GetMasterPageByType(this Page page, Type type)
  • RenderUserControl(this string path, Dictionary<string, object> propertiesToSet = null)

Content

  • .

DataTypes

  • .

Dates

  • Age()
  • GetDayNumber()
  • IsWeekday()
  • IsWeekend()
  • IsLeapYear()
  • ElapsedSeconds()
  • DateWithinLastDays(int days)
  • ToUnixTime()
  • GetFirstDayOfMonth()
  • GetLastDayOfMonth()
  • PrettyDate()
  • FormatDateTime(string format) FormatDateTime("ddd ddS MMMM yyyy") note the S for suffix
  • GetMonthName()
  • GetDayName()

Numeric

  • ToInt()
  • AbsoluteValue()

DocumentTypes

  • .

ImageGen

  • .

ImageResizing

  • .

Media

  • .

MediaTypes

  • .

Members

  • .

Social

  • GravatarImageURL(string defaultImageURL, int size)

Strings

  • FirstCharToUpper()
  • HighlightKeywords(IEnumerable keywords, string className)
  • StripHTML(bool ignoreParagraphs = true, bool ignoreItalic = true, bool ignoreUnderline = true, bool ignoreBold = true, bool ignoreLinebreak = true, List otherTagsToIgnore = null)
  • ShortenHTML(out bool inputIsShortened, int length = 300, string elipsis = "...")
  • ShortenHTML(int length = 300, string elipsis = "...")
  • RemoveDiacritics(string input)
  • StripHtml(bool ignoreParagraphs = true, bool ignoreItalic = true, bool ignoreUnderline = true, bool ignoreBold = true, bool ignoreLinebreak = true, List otherTagsToIgnore = null)
  • ShortenHtml(out bool inputIsShortened, int length = 300, string elipsis = "...")
  • ShortenHtml(int length = 300, string elipsis = "...")
  • GetSentence(sentenceIndex)
  • GetParagraph(paragraphIndex)
  • TruncateAtWord(int length)
  • InvertCase()
  • SubstringBefore(string string2)
  • SubstringAfter(string string2)

Templates

  • .

Users

  • GetAllUsers()
  • GetUsersByType(int userTypeId)
  • GetUsersByType(string typeAlias)
  • GetCurrentUserTypes()
  • GetCurrentUser()

Vimeo

  • string VimeoEmbed(this int vimeoId, int width, int height)
  • string VimeoEmbed(this string vimeoId, int width, int height)
  • int GetVimeoDuration(this int vimeoId)
  • int GetVimeoDuration(this string vimeoId)
  • string GetVimeoThumbnail(this int vimeoId)
  • string GetVimeoThumbnail(this string vimeoId)
  • string GetVimeoThumbnail(this int vimeoId, VimeoThumbnail size)
  • string GetVimeoThumbnail(this string vimeoId, VimeoThumbnail size)

YouTube

  • string GetYouTubeId(this string subject)
  • bool GetYouTubeId(this string subject, out string videoId)
  • string YouTubeEmbed(this string videoId, int width, int height)
  • string YouTubeEmbed(this string videoId, int width, int height, bool showRelations, string wmode)
  • string GetYouTubeThumbnail(this string videoId)
  • string GetYouTubeThumbnail(this string videoId, int index)

Do you have any ideas?

Get in touch with me on twitter @warrenbuckley and let's get this project going...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.