Cheat sheet for umbraco development for Newbie

umbraco Get member by email address

Member memInfo = GetMemberFromEmail("xyz@gmail.com");

Get member from cache in umbraco

Member currentMem = Member.GetCurrentMember();
Member memInfo = GetMemberFromCache(currentMem.Id);

Get member by username in umbraco

Member[] memberList = GetMemberByName("username", false);

Get member by Name instead of user name in umbraco

Member[] memberList = GetMemberByName("name", true);

umbraco Get current member information

Member currentMem = Member.GetCurrentMember();

umbraco Get current member loginName

Member currentMem = Member.GetCurrentMember();
string memeberLoginName = currentMem.LoginName;

umbraco Get current member password

Member currentMem = Member.GetCurrentMember();
string currentMemPassword = currentMem.Password;

umbraco Get current member Id

Member currentMem = Member.GetCurrentMember();
int memberId = currentMem.Id;

Here I have shared useful link based on there context which is very useful for new umbraco developer.

 Umbraco Article

how To Set Nevigation In Umbraco:
——————————————
http://how-to-code-net.blogspot.ro/2012/07/how-to-create-sitemap-for-website-in.html

Parameter Passing in umbraco
—————————————————————————————–
http://munkimagik.wordpress.com/2009/04/08/adding-umbraco-macro-dynamically-to-user-control/
http://skiltzonnet.blogspot.in/2008/04/creating-your-first-umbraco-user.html
http://forum.umbraco.org/yaf_postst2325_Cant-send-parameters-to-NET-user-control.aspx
http://our.umbraco.org/forum/developers/extending-umbraco/2356-%5Bsolved%5D-loading-macro-parameter-values-into-a-usercontrol
http://umbraco.com/help-and-support/video-tutorials/introduction-to-umbraco/developer-introduction/macro-parameters/TVPlayer

Execute Stored Procedure from umbraco
http://our.umbraco.org/forum/developers/api-questions/5424-stored-procedures–Umbraco

How to Create Member In umbraco
http://www.nibble.be/?p=20#comment-67319

XSLT Library Information for umbraco
http://neehouse.com/code/xslt/cdata_string_output.aspx
http://www.devx.com/xml/Article/28610/1954

How to add java script in XSLT
————————————-
http://mysharepointwork.blogspot.in/2010/02/adding-javascript-in-xslt.html
http://www.dpawson.co.uk/xsl/sect4/N9745.html

Add CSS in XSLT
————————————–
http://www.velocityreviews.com/forums/t166257-linking-to-a-separate-css-in-xsl.html

online XSLT viewer
————————————–
http://xslt.online-toolz.com/tools/xslt-transformation.php
Create Member Type Programatically:
———————————————————
http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-members/membertypes-creator-and-createmembertype-page
http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-members
http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-members/manually-selecting-member-properties
http://our.umbraco.org/forum/developers/api-questions/10495-Get-members-by-member-group
http://our.umbraco.org/forum/developers/extending-umbraco/5317-current-login-user
http://our.umbraco.org/wiki/how-tos/membership-providers

Create Media Type and Media by code in c#:
——————————————–
http://our.umbraco.org/forum/developers/api-questions/3477-Creating-Media-Programatically
http://our.umbraco.org/forum/developers/api-questions/6503-Upload-datatype-member-uploading-image
http://forum.umbraco.org/yaf_postst9663_Image-from-Media-Library-in-Masterpage.aspx
http://our.umbraco.org/wiki/how-tos/creating-custom-media-types
http://our.umbraco.org/forum/developers/extending-umbraco/17669-Storing-Image-in-Database
http://msdn.microsoft.com/en-us/library/aa479405.aspx

Advertisements

Execute Sql query in umbraco during package installation

Scenario:
  How to create table in Sql by action script during package installation in umbraco.
  How to create stored procedure by action script during package installation in umbraco.

Well this is common scenario where you want to create some table and stored procedure
and many more related to your package and application.So how we will accomplish
this task.
For accomplish this task use

<Action runat="install" undo="true" alias="ExecuteSql">
<![CDATA[----Enter Your Sql Statement here--- ]]>
</Action>

Here is Example for table creation in sql server 2008:

Note1: Alias name can be any thing you want.
Note2: Make sure that your action script doesn’t contains any blank space
other wise it will not going to execute.

<Action runat="install" undo="true" alias="ExecuteSql"><
![CDATA[
CREATE TABLE [uTasklist_Task](
[task_id] [int] IDENTITY(1,1) NOT NULL,
[task_details] [ntext] NOT NULL,
[create_date] [datetime] NOT NULL,
CONSTRAINT [PK_uTasklist_Task] PRIMARY KEY CLUSTERED
(
[task_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]]]>
</Action>

Here is example for stored procedure creation in sql server 2008 during package installation.

<Action runat="install" undo="true" alias="ExecuteSql">
<![CDATA[
CREATE PROC [uTasklist_SetTasklist]
@task_details [NTEXT], @create_date [DATETIME]
AS
SET NOCOUNT ON
INSERT INTO [uTasklist_Task] VALUES(@task_details, @create_date)]]>
</Action>

Here is Another good link for: Package installation tools for Umbraco @ codePlax