<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dũng Lê</title>
	<atom:link href="http://dungle30.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dungle30.wordpress.com</link>
	<description>Be what you want to be</description>
	<lastBuildDate>Thu, 24 Jun 2010 11:54:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dungle30.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/3e60a6d4edfc27594e2988d12e612da1?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Dũng Lê</title>
		<link>http://dungle30.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dungle30.wordpress.com/osd.xml" title="Dũng Lê" />
	<atom:link rel='hub' href='http://dungle30.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Create Composer page type and content function using PageTypeBuilder 1.2</title>
		<link>http://dungle30.wordpress.com/2010/06/24/create-composer-page-type-using-pagetypebuilder/</link>
		<comments>http://dungle30.wordpress.com/2010/06/24/create-composer-page-type-using-pagetypebuilder/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 11:36:23 +0000</pubDate>
		<dc:creator>Dung Le</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[EPiServer]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[episerver]]></category>
		<category><![CDATA[pagetypebuilder]]></category>

		<guid isPermaLink="false">http://dungle30.wordpress.com/?p=17</guid>
		<description><![CDATA[Introduction: Page Type Builder (a.k.a PTB) by Joel Abrahamsson is one of the most popular Open Source projects for EPiServer CMS developers. It helps increase developer productivity when creating EPiServer solutions. See http://pagetypebuilder.codeplex.com/ for information and links. EPiServer Composer: Using a very few main templates combined with independent inner templates and functions, you can use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dungle30.wordpress.com&amp;blog=12014610&amp;post=17&amp;subd=dungle30&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Introduction:</p>
<p><strong>Page Type Builder</strong> (a.k.a PTB) by Joel Abrahamsson is one of the most popular Open Source projects for EPiServer CMS developers. It helps increase developer productivity when creating EPiServer solutions. See <a href="http://pagetypebuilder.codeplex.com/">http://pagetypebuilder.codeplex.com/</a> for information and links.</p>
<p><strong>EPiServer Composer</strong>: Using a very few main templates combined with independent inner templates and functions, you can use EPiServer Composer to create custom pages with features not available before. EPiServer Composer&#160; gives you notably more flexibility than the standard version of EPiServer CMS.</p>
<p><a title="http://world.episerver.com/Download/Items/Extension-3/EPiServer-Composer-4-Beta/" href="http://world.episerver.com/Download/Items/Extension-3/EPiServer-Composer-4-Beta/">http://world.episerver.com/Download/Items/Extension-3/EPiServer-Composer-4-Beta/</a></p>
<p>I take a look into&#160; new version of PTB is released (PageTypeBuilder 1.2) and tried to create Composer page type and content function by using PTB. Everything work well together. As many of you might know that in previous version, we have some issues in using Page Type Builder and Composer though (Stefan Forsberg <a href="http://world.episerver.com/Blogs/Stefan-Forsberg/Dates/2010/4/Using-PageTypeBuilder-with-Composer/">pointing this out</a>). In latest version, Joel Abrahamsson was made changes in API to check null in DataFactory_LoadedPage to play nicer with Composer.</p>
<p>In this sample, I just want to show how to create new Composer page type and Content function by using Page Type Builder. Beside that there is a trick to put Composer property in existing Tab of EPiServer CMS. You can refer to PageTypeBuilder home page in CodePlex on how to create new page type using Page Type Builder (<a href="http://world.episerver.com/en/Articles/Items/Introducing-Page-Type-Builder/">http://world.episerver.com/en/Articles/Items/Introducing-Page-Type-Builder/</a>)</p>
<p>1. Create new page type</p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">using</span><span style="font-family:monaco;font-size:9pt;"> Dropit.Extension.SpecializedProperties; </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">using</span><span style="font-family:monaco;font-size:9pt;"> PageTypeBuilder; </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">namespace</span><span style="font-family:monaco;font-size:9pt;"> EPiServer.Templates.Demo.Pages </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">{ </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">[<span style="color:#2b91af;">PageType</span>(Filename = <span style="color:#a31515;">&quot;~/Templates/Demo/Pages/TestPage.aspx&quot;</span>, Name = <span style="color:#a31515;">&quot;Test page type&quot;</span>, AvailableInEditMode = <span style="color:blue;">true</span>, Description = <span style="color:#a31515;">&quot;Test page type&quot;</span>)] </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span style="color:blue;">public</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">TestPageType</span> : <span style="color:#2b91af;">TypedPageData </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">{ </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">[<span style="color:#2b91af;">PageTypeProperty</span>(Type = <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">ExtensionContentAreaProperty</span>), DisplayInEditMode = <span style="color:blue;">false</span>, Searchable = <span style="color:blue;">true</span>, UniqueValuePerLanguage = <span style="color:blue;">false</span>, Tab = <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">ComposerTab</span>))] </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span style="color:blue;">public</span> <span style="color:blue;">virtual</span> <span style="color:blue;">string</span> MainArea { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; } </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">[<span style="color:#2b91af;">PageTypeProperty</span>(Type = <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">ExtensionPageProperty</span>), DisplayInEditMode = <span style="color:blue;">true</span>, Searchable = <span style="color:blue;">true</span>, Tab = <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">ComposerTab</span>))] </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span style="color:blue;">public</span> <span style="color:blue;">virtual</span> <span style="color:blue;">string</span> ExtensionPageProperty { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; } </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">} </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">} </span></p>
<p>Create new page type by using TestPage.aspx file as template page. Most important things is the required properties of Composer page type <strong>ExtensionPageProperty.</strong></p>
<p>In the sample, I create a page type that look the same as Composer wide page (in Composer sample package) with only one content area. Here you can see that I used ExtensionContentAreaProperty for MainArea and ExtensionPageProperty. The Tab agrument was assigned to ComposerTab, I will explain about this later in this post.</p>
<p>- The template file look like that:</p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;background:yellow;font-size:9pt;">&lt;%</span><span style="font-family:monaco;color:blue;font-size:9pt;">@</span><span style="font-family:monaco;font-size:9pt;"> <span style="color:#a31515;">Page</span> <span style="color:red;">Language</span><span style="color:blue;">=&quot;C#&quot;</span> <span style="color:red;">AutoEventWireup</span><span style="color:blue;">=&quot;true&quot;</span> <span style="color:red;">CodeBehind</span><span style="color:blue;">=&quot;TestPage.aspx.cs&quot;</span> <span style="color:red;">Inherits</span><span style="color:blue;">=&quot;EPiServer.Templates.Demo.Pages.TestPage&quot;</span> <span style="color:red;">MasterPageFile</span><span style="color:blue;">=&quot;~/Templates/Demo/MasterPages/MasterPage.master&quot;</span> <span style="background:yellow;">%&gt; </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;background:yellow;font-size:9pt;"></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">&lt;</span><span style="font-family:monaco;color:#a31515;font-size:9pt;">asp</span><span style="font-family:monaco;color:blue;font-size:9pt;">:</span><span style="font-family:monaco;color:#a31515;font-size:9pt;">Content</span><span style="font-family:monaco;font-size:9pt;"> <span style="color:red;">ID</span><span style="color:blue;">=&quot;Content1&quot;</span> <span style="color:red;">ContentPlaceHolderID</span><span style="color:blue;">=&quot;MainRegion&quot;</span> <span style="color:red;">runat</span><span style="color:blue;">=&quot;server&quot;&gt; </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;"></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:green;font-size:9pt;">&lt;!&#8211; </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:green;font-size:9pt;">The page contains only one single Extension content area: MainArea. </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:green;font-size:9pt;">Using divider functions for designing the layout </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:green;font-size:9pt;">&#8211;&gt; </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">div</span> <span style="color:red;">id</span><span style="color:blue;">=&quot;StageArea&quot;</span> <span style="color:red;">class</span><span style="color:blue;">=&quot;StartPage&quot;</span> <span style="color:red;">style</span><span style="color:blue;">=&quot;</span><span style="color:red;">min-height</span>:<span style="color:blue;">100px</span>;<span style="color:blue;">&quot;&gt; </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">Extension</span><span style="color:blue;">:</span><span style="color:#a31515;">ExtensionContentArea</span> <span style="color:red;">runat</span><span style="color:blue;">=&quot;server&quot;</span> <span style="color:red;">ID</span><span style="color:blue;">=&quot;MainArea&quot;</span> <span style="color:red;">Description</span><span style="color:blue;">=&quot;MainArea using all available space&quot;</span> <span style="color:blue;">/&gt; </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span style="color:blue;">&lt;/</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt; </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">&lt;/</span><span style="font-family:monaco;color:#a31515;font-size:9pt;">asp</span><span style="font-family:monaco;color:blue;font-size:9pt;">:</span><span style="font-family:monaco;color:#a31515;font-size:9pt;">Content</span><span style="font-family:monaco;color:blue;font-size:9pt;">&gt; </span></p>
<p>And the code behind:</p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">using</span><span style="font-family:monaco;font-size:9pt;"> System;
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">using</span><span style="font-family:monaco;font-size:9pt;"> Dropit.Extension.Core;
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">using</span><span style="font-family:monaco;font-size:9pt;"> PageTypeBuilder.UI;
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">namespace</span><span style="font-family:monaco;font-size:9pt;"> EPiServer.Templates.Demo.Pages
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">partial</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">TestPage</span> : <span style="color:#2b91af;">TemplatePage</span>&lt;<span style="color:#2b91af;">TestPageType</span>&gt;
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:green;">//Add a ExtensionPageHandler for enable Composer
</p>
<p>     </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">private</span> <span style="color:blue;">readonly</span> <span style="color:#2b91af;">ExtensionPageHandler</span> _extensionHandler;
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">public</span> TestPage()
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>_extensionHandler = <span style="color:blue;">new</span> <span style="color:#2b91af;">ExtensionPageHandler</span>();
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">protected</span> <span style="color:blue;">override</span> <span style="color:blue;">void</span> OnInit(<span style="color:#2b91af;">EventArgs</span> e)
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">base</span>.OnInit(e);
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:green;">//It&#8217;s important that _extensionHandler initialized after base.OnInit.
</p>
<p>     </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>_extensionHandler.Initialize(<span style="color:blue;">this</span>);
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">protected</span> <span style="color:blue;">void</span> Page_Load(<span style="color:blue;">object</span> sender, <span style="color:#2b91af;">EventArgs</span> e)
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">}
</p>
<p>   </span></p>
</p>
<p>2. Create new content function</p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">using</span><span style="font-family:monaco;font-size:9pt;"> Dropit.Extension.SpecializedProperties;
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">using</span><span style="font-family:monaco;font-size:9pt;"> PageTypeBuilder;
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">namespace</span><span style="font-family:monaco;font-size:9pt;"> EPiServer.Templates.Demo.Pages
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span>[<span style="color:#2b91af;">PageType</span>(Filename = <span style="color:#a31515;">&quot;/composer/functions/text.ascx&quot;</span>, AvailableInEditMode = <span style="color:blue;">true</span>, Name = <span style="color:#a31515;">&quot;Test Article Function&quot;</span>, Description = <span style="color:#a31515;">&quot;Test Article Function&quot;</span>)]
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">TestContentFunction</span> : <span style="color:#2b91af;">TypedPageData
</p>
<p>     </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>[<span style="color:#2b91af;">PageTypeProperty</span>(Type = <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">ExtensionFunctionProperty</span>), DisplayInEditMode = <span style="color:blue;">false</span>, Searchable = <span style="color:blue;">false</span>, UniqueValuePerLanguage = <span style="color:blue;">true</span>, Tab = <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">ComposerTab</span>))]
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">virtual</span> <span style="color:blue;">string</span> ExtensionContentFunctionProperty { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>[<span style="color:#2b91af;">PageTypeProperty</span>(UniqueValuePerLanguage = <span style="color:blue;">false</span>, Searchable = <span style="color:blue;">false</span>, DisplayInEditMode = <span style="color:blue;">false</span>, Tab = <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">ComposerTab</span>))]
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">virtual</span> <span style="color:blue;">bool</span> NeverUsedProperty { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>[<span style="color:#2b91af;">PageTypeProperty</span>(UniqueValuePerLanguage = <span style="color:blue;">false</span>, Searchable = <span style="color:blue;">true</span>, DisplayInEditMode = <span style="color:blue;">true</span>, Tab = <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">ComposerTab</span>), EditCaption = <span style="color:#a31515;">&quot;Heading text&quot;</span>)]
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">virtual</span> <span style="color:blue;">string</span> Heading { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>[<span style="color:#2b91af;">PageTypeProperty</span>(UniqueValuePerLanguage = <span style="color:blue;">false</span>, Searchable = <span style="color:blue;">true</span>, DisplayInEditMode = <span style="color:blue;">true</span>, Tab = <span style="color:blue;">typeof</span>(<span style="color:#2b91af;">ComposerTab</span>), EditCaption = <span style="color:#a31515;">&quot;Body text&quot;</span>)]
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">virtual</span> <span style="color:blue;">string</span> MainBody { <span style="color:blue;">get</span>; <span style="color:blue;">set</span>; }
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p><span style="line-height:115%;font-family:monaco;font-size:9pt;">}</span> </p>
<p>Here I use the same template file of Article content function from Composer sample package. Note that we define required properties from Composer and its type.</p>
<p>3. Put page type properties into an existed Tab in EPiServer CMS</p>
<p>Create new class inherited from PageTypeBuilder.Tab. Find the tab that you want to put your properties (Edit Tabs section under Page Type of EPiServer CMS Admin mode)</p>
<p><a href="http://dungle30.files.wordpress.com/2010/06/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://dungle30.files.wordpress.com/2010/06/image_thumb.png?w=590&#038;h=33" width="590" height="33" /></a> </p>
<p>In this sample, I will put all properties to Extension tab.</p>
<p><span style="font-family:monaco;color:blue;font-size:9pt;">using</span><span style="font-family:monaco;font-size:9pt;"> EPiServer.Security;
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">using</span><span style="font-family:monaco;font-size:9pt;"> PageTypeBuilder;
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;">namespace</span><span style="font-family:monaco;font-size:9pt;"> EPiServer.Templates.Demo.Pages
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">ComposerTab</span> : <span style="color:#2b91af;">Tab
</p>
<p>     </span></span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>#region</span><span style="font-family:monaco;font-size:9pt;"> Overrides of Tab
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">override</span> <span style="color:blue;">string</span> Name
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">get</span> { <span style="color:blue;">return</span> <span style="color:#a31515;">&quot;Extension&quot;</span>; }
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">override</span> <span style="color:#2b91af;">AccessLevel</span> RequiredAccess
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">get</span> { <span style="color:blue;">return</span> <span style="color:#2b91af;">AccessLevel</span>.Edit; }
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">public</span> <span style="color:blue;">override</span> <span style="color:blue;">int</span> SortIndex
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>{
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><span style="color:blue;">get</span> { <span style="color:blue;">return</span> 1000; }
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">
<p>&#160;</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;color:blue;font-size:9pt;"><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span>#endregion
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;"><span>&#160;&#160;&#160; </span>}
</p>
<p>   </span></p>
<p style="line-height:normal;margin-bottom:0;" class="MsoNormal"><span style="font-family:monaco;font-size:9pt;">}
</p>
<p>   </span></p>
<p>Must return exactly the value of Extension Tab (Name, Required Access Level and the Sort index). If we don’t return the same value of Extension tab, then PageTypeBuilder will create new one.</p>
<p>After all, compile the project and go to Admin mode of EPiServer CMS. You can see new page type for Composer page type and content function appeared. New page type and content function also automatically registered in Composer Admin mode. Now you can using new page type and new content function in Edit mode and View mode.</p>
<p>Enjoy Composer and Page Type Builder!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dungle30.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dungle30.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dungle30.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dungle30.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dungle30.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dungle30.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dungle30.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dungle30.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dungle30.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dungle30.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dungle30.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dungle30.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dungle30.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dungle30.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dungle30.wordpress.com&amp;blog=12014610&amp;post=17&amp;subd=dungle30&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dungle30.wordpress.com/2010/06/24/create-composer-page-type-using-pagetypebuilder/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11de8d2177bc0384fd31bca22c89d7d4?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">dungle30</media:title>
		</media:content>

		<media:content url="http://dungle30.files.wordpress.com/2010/06/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Installation order for Visual Studio 2008 SP1, Team Explorer and SQL Server 2008</title>
		<link>http://dungle30.wordpress.com/2010/02/14/installation-order-for-visual-studio-2008-sp1-team-explorer-and-sql-server-2008/</link>
		<comments>http://dungle30.wordpress.com/2010/02/14/installation-order-for-visual-studio-2008-sp1-team-explorer-and-sql-server-2008/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 14:32:08 +0000</pubDate>
		<dc:creator>Dung Le</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Team Explorer]]></category>
		<category><![CDATA[VS 2008]]></category>

		<guid isPermaLink="false">http://dungle30.wordpress.com/?p=12</guid>
		<description><![CDATA[In summary, the installation order for all the components mentioned here should be: Visual Studio 2008 Team Explorer Visual Studio 2008 Service Pack 1 SQL Server This is to make sure Team Explorer and VS 2008 SP 1 work well together. Otherwise you will need to reinstall VS 2008 SP1 after installing Team Explorer<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dungle30.wordpress.com&amp;blog=12014610&amp;post=12&amp;subd=dungle30&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In summary, the installation order for all the components mentioned  here should be:</p>
<ol>
<li>Visual Studio 2008</li>
<li>Team  Explorer</li>
<li>Visual Studio 2008 Service Pack 1</li>
<li>SQL  Server</li>
</ol>
<p>This is to make sure Team Explorer and VS 2008 SP 1 work well together. Otherwise you will need to reinstall VS 2008 SP1 after installing Team Explorer</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dungle30.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dungle30.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dungle30.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dungle30.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dungle30.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dungle30.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dungle30.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dungle30.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dungle30.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dungle30.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dungle30.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dungle30.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dungle30.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dungle30.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dungle30.wordpress.com&amp;blog=12014610&amp;post=12&amp;subd=dungle30&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dungle30.wordpress.com/2010/02/14/installation-order-for-visual-studio-2008-sp1-team-explorer-and-sql-server-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11de8d2177bc0384fd31bca22c89d7d4?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">dungle30</media:title>
		</media:content>
	</item>
		<item>
		<title>Happy Lunar New Year! Chúc Mừng Năm Mới</title>
		<link>http://dungle30.wordpress.com/2010/02/14/happy-lunar-new-year-chuc-m%e1%bb%abng-nam-m%e1%bb%9bi/</link>
		<comments>http://dungle30.wordpress.com/2010/02/14/happy-lunar-new-year-chuc-m%e1%bb%abng-nam-m%e1%bb%9bi/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 07:44:45 +0000</pubDate>
		<dc:creator>Dung Le</dc:creator>
				<category><![CDATA[Social life]]></category>
		<category><![CDATA[Cultures]]></category>
		<category><![CDATA[Festivals]]></category>
		<category><![CDATA[TET]]></category>
		<category><![CDATA[Traditions]]></category>

		<guid isPermaLink="false">http://dungle30.wordpress.com/?p=6</guid>
		<description><![CDATA[Planning a Celebration? Sequence of the Tet Celebration Do it right. Here&#8217;s a step-by-step sequence of the Tet Celebration Preparation.During the week before Tet, some families visit the graves of parents and grandparents. Fresh earth is placed on top, weeds removed from around it and incense is burnt to invoke the souls of the dead [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dungle30.wordpress.com&amp;blog=12014610&amp;post=6&amp;subd=dungle30&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_7" class="wp-caption alignnone" style="width: 310px"><a href="http://dungle30.files.wordpress.com/2010/02/newyear.jpg"><img class="size-medium wp-image-7" title="Happy Lunar New Year" src="http://dungle30.files.wordpress.com/2010/02/newyear.jpg?w=300&#038;h=168" alt="Happy Lunar New Year! Chúc Mừng Năm Mới!" width="300" height="168" /></a><p class="wp-caption-text">Happy Lunar New Year! Chúc Mừng Năm Mới!</p></div>
<p><strong>Planning a Celebration?</strong></p>
<p>Sequence  of the Tet Celebration</p>
<p>Do it right. Here&#8217;s a  step-by-step sequence of the Tet Celebration</p>
<p><strong>Preparation</strong>.During  the week before Tet, some families visit the graves of parents and  grandparents. Fresh earth is placed on top, weeds removed from around it  and incense is burnt to invoke the souls of the dead from the other  world to return to visit the family home.</p>
<p>The  Kitchen God (Ong Tao or Mandarin Tao) is also called the Hearth God, the  Stove God or the Household God. This god who was privy to the family&#8217;s  most private business and intimate secrets for the ending year, returns  to Heaven to make his report to the Jade Emperor. This report includes  the year&#8217;s activities of the household in which he has lived. On the  23rd day of the 12th month, a farewell and thank you dinner is given to  the Kitchen God by the household. The Kitchen God will need a week for  his mission to Heaven.</p>
<p>Folklore has made the  spirit of the hearth into a picturesque character, a buffoon who is the  butt of crude jokes. Although he is a messenger of the Jade Emperor in  Heaven, he is depicted as so poor as to be unable to afford much  clothing. He wears an important mandarin hat but goes about with bare  legs because he has scorched his pants in the hearth fire. Another  version tells that he was in such a rush to get back to Heaven that he  forgot his pants and ascended in only his underwear. Efforts must be  made to put him in a proper mood to secure a favorable report to the  Jade Emperor of the family&#8217;s activities. Offerings are made to him.  These gifts certainly aim at influencing the outcome of the report. But  no one considers such gifts to be crass bribery. Such pleasantries  merely sweeten the god&#8217;s way, as perhaps cookies placed by the fireplace  will please Santa Claus, who might be tired from delivering so many  gifts on Christmas night.</p>
<p>The paper carps, horses  and clothing (hats, robes and boots) will be burned by the family and  thus transformed into a spiritual essence usable by Ong Tao in the world  beyond. Like Santa Claus, the Kitchen God is loved and respected. Both  have the capacity to bring fortune and happiness into the home depending  on the previous year&#8217;s behavior. Although beliefs about the Kitchen God  have changed over the years, he remains an important figure in the rich  texture of Vietnamese New Year. The Kitchen God travels on the back of a  brightly colored and powerful paper horse or sometimes a grand bird  with great wings, such as a crane. Or he might ride on a carp with  golden scales. Paper images of these vehicles are purchased at Tet or a  living specimen of fish is bought and later set free. The day of his  departure is marked by the calls of fishmongers from the countryside  carrying baskets of fish hanging from their shoulder poles and calling  &#8220;Fish for sale, fine mounts for the Household Gods to make their ride!&#8221;  Live fish held in tanks of water and plastic bags are released into  ponds, lakes, rivers and streams to impress the god with the kindness of  the household. In Hanoi, the Sword Lake is a favorite spot for  releasing Ong Tao&#8217;s fish-vehicle. In some cases, three fish are released  to account for the possibility that one must please all three Hearth  Gods.</p>
<p>Most frequently we hear of only the Kitchen  God, but many legends support the trinity of Kitchen Gods. Ong Tao  represents the blending of all three.</p>
<p>In the old  days, and still in some countryside homes, cooking occurs over clay  tripods. Three stones were all that was needed to hold up the pot over  the fire. Few people spend time thinking about the nature of the Kitchen  Gods or the specific meaning of the items that are associated with  them. The three Hearth Gods are represented at Tet by three hats and  shops sell sets of three miniature paper hats: two men&#8217;s hats and one  woman&#8217;s. These are burned as offerings to Ong Tao. The God will also  need a new pair of boots to wear as he travels to Heaven. Two favorite  gifts for the triad of household deities are gold and wine.</p>
<p>In the central part of Vietnam, cooking tripods or  blocks that make up the family hearth, even if they are still usable,  are ritually discarded when the God leaves. One week later, new blocks  will greet his return or the arrival of his replacement assigned by the  Jade Emperor.</p>
<p>After the Kitchen God has left,  preparations for the New Year festivities begin in earnest. The week  before New Year&#8217;s Eve is a period of Tat Nien. Tat Nien (literally  meaning the end or &#8216;to extinguish the year&#8217;) is the celebration of the  last session of a period, such as the last class of school, the last bus  home, the last day in the office, even the last bath, all with parties  and great ceremony. There is a festive holiday atmosphere before New  Year&#8217;s Eve with dragon dances.</p>
<p>Some families set  up a Tet tree in the week before New Year&#8217;s Eve. The Tet tree called cay  neu, is a bamboo pole stripped of most of its leaves except for a bunch  at the very top. The Tet tree has Taoist origins and holds talismanic  objects that clang in the breeze to attract good spirits and repel evil  ones. On the very top, they frequently place a paper symbol of yin and  yang, the two principal forces of the universe. Sometimes a colorful  paper carp flag will fly from the top. The carp (or sometimes a horse)  is the vehicle on which the Hearth God travels to make his report. This  tree is more common in the countryside now than in the city. It is  ceremonially removed after the seventh day of Tet.</p>
<p>Sweeping and scrubbing is done in advance as tradition  discourages cleaning during the holiday itself. During this time, shops  and restaurants close while the cleaning spree proceeds in earnest. On  hands and knees, the floors will be scrubbed; bronze will be polished to  a brand new finish. Closets will be ransacked for old clothes to be  tossed out. Shoppers swarm the streets at temporary Tet stalls that have  sprung up, lit with tiny gaily-flashing lights. Everything needed for  the celebration from food to decorations is at hand and in abundance at  these Tet markets.</p>
<p>Two items required for the  proper enjoyment of Tet are flowering branches and the kumquat bush. For  the sale of these and other flowers and plants, a lively flower market  is held in the center of the ancient quarter of Hanoi on Hang Luoc  Street. A massive flower market was organized on Nguyen Hue Street in Ho  Chi Minh City and attracts crowds who walk up and down the street  admiring the flowers, meeting old friends and making new ones. However,  this was moved out of the center in 1996. Throughout the country on  bicycles of roving vendors, flowers create great splashes of color. In  the south, the bright golden yellow branches of the mai apricot are seen  everywhere. In the north, the soft rose-colored dao peach flowers  decorate homes and offices. A truck driver will adorn his truck with a  dao branch to cheer him on a long-distance run.</p>
<p>Miniature  kumquat bushes about two or three feet tall are carefully selected and  prominently displayed. To carefully choose a kumquat bush, the buyer  must pay attention to the symmetrical shape, to the leaves and to the  color and shape of the fruit. The bushes have been precisely pruned to  display ripe deep orange fruits with smooth clear thin skin shining like  little suns or gold coins on the first day. Other fruits must still be  green to ripen later. This represents the wish that wealth will come to  you now and in the future. The leaves must be thick and dark green with  some light green sprouts. The fruits represent the grandparents, the  flowers represent parents, the buds represent children and the light  green leaves represent grandchildren. The tree thus symbolizes many  generations. Guests will caress the light green leaves about to sprout  and compliment the discerning host who chose so carefully. The Sino-Viet  pronunciation of the word for orange sounds like the word for wealth  and the tangerines signify good luck.</p>
<p>Crowds of  shoppers at the markets become thicker and more frantic each night,  holding up traffic as they jostle each other to reach the counters with  the best buys. Prices are a bit higher, but then thriftiness is not  considered a virtue at Tet. Everyone is wishing each other Chuc Mung Nam  Moi!</p>
<p>One must purchase the sugared fruits, banh  chung and the colorful decorations before the afternoon of Tet.</p>
<p>While shoppers roam the streets, banh chung patties  wrapped in leaves are steaming in giant vats. The outside has taken on a  lovely light green tinge after being boiled inside a wrapper of leaves.  Banh chung in the north is a square patty measuring seven inches and  two inches thick, filled with shreds of fatty pork surrounded by a dense  mixture of sticky rice and mashed ground green beans. In the south, a  similar dish is cylindrical. It is given as a gift at this time of year  and has a similar long life and social significance as the western  Christmas fruitcake. These are frequently called sticky rice cakes, but  are unlike sweet cakes in the western sense. There is however, a sweet  version made without meat but with sugar added called banh ngot (sweet  rice patty).</p>
<p>Suddenly, as if by command of some  magic wand, the spree of activity, the light, the noise, all vanishes.  By early evening, markets and shops are abandoned. Shops, stalls and  restaurants are locked leaving a notice hung on the door announcing the  date of reopening. Special dishes must be completed that are expected to  serve the family and its guests for the first three days of the new  year. People desert the outer world and disappear on the requisite trip  to their home villages and inside their homes for intimate family  celebrations.</p>
<p>* * *</p>
<p><strong>Giao Thua.</strong> As midnight approaches, all  eyes maintain a close look on clocks and watches. The Giao Thua ritual  occurs at that most sacred moment in time. At midnight on the last day  of the year, every Vietnamese family whispers similar fervent prayers.  Bells ring and drums beat in temples. The old year gives over its  mandate to the New Year. The words Giao Thua (Giao means to give and  Thua means to receive) mean a passing on or a receiving and handing down  of life, and the recognition of that gift by the present generation. It  marks the magical transition time from one year to another. Those who  practice Buddhism will pray in the pagoda.</p>
<p>In the  Gia Tien (family ancestor) ritual or calling of the ancestors,  invitations are extended to the deceased relatives to visit for a few  days in the world of the living family. They are lured home and kept  happy until they leave. The head of the household lights incense and  folds hands at heart level in the position of prayer. The prayer may  proceed as follows: &#8220;In the year of&amp;. And the date of&amp;. Make  these offerings and invite all of our ancestors to join in eating Tet  with us.&#8221;</p>
<p>The past generations are invited to  share the family&#8217;s joys and concerns to enjoy a meal with the living, to  catch up on the family news and to lavish riches and honors on their  descendants.</p>
<p>&#8220;I pray to the Heavenly King, the  Jade Emperor, to his assistants and to the Earth God and the guardian  spirit and to any other spirits present. On behalf of the &amp;family,  we offer you incense, gold and silver, fruit and flowers, alcohol and  fixings for the betel quid. We are all here to make these offerings so  that the next year will be free of disasters and harmful occurrences and  that the family will prosper. Please bless us all, young and old, with  happiness, prosperity and long life. (Here he might mention some events  of the past year such as the birth of a child, someone&#8217;s new employment  or the successful entrance of a child into a good school). Please  forgive us any transgressions we may have unknowingly committed against  you or others.&#8221;</p>
<p>Bowing motions, called Le, are  performed at least three times and the ceremony ends when all have  prostrated themselves (or in more modern families, folded hands and  prayed) before the altar. After the &#8220;money for the dead&#8221; and other paper  gifts are burnt in the courtyard, the family watches the ashes dance  away on warm currents of air, a sign that the dead have received their  gifts. The spiritual presence of the ancestors will be palpable during  the days of Tet.</p>
<p>In recent times, a new tradition  has evolved to celebrate the important evening of the new year. Those  who are not at home praying at this momentous time may be socializing  with friends. In the cities, there will be community fireworks displays  that will draw the young from their homes into the square or park.  Although firecrackers are now illegal in Vietnam, some kind of loud  noises will be made. It can be the banging of cans, the use of  electronic popping firecrackers or human voices whooping it up. People  will break off branches and twigs that contain newly sprouted leaves to  bring a sense of freshness and vitality into their home. This follows a  Buddhist tradition of bringing fresh new leaves and &#8220;fortune bearing  buds&#8221; into the home from the pagoda.</p>
<p>* * *</p>
<p><strong>First Morning or  Head Day</strong> is reserved for the nuclear family, that is, the  husband&#8217;s household. Immediate family members get together and celebrate  with the husband&#8217;s parents. A younger brother, if the parents are not  alive, will visit his older sibling. Faraway sons and daughters journey  to be with their parents on this day. Children anticipate a ritual  called Mung Tuoi, or the well wishing on the achievement of one more  year to one&#8217;s life. With both arms folded in front of their chest in  respect, they thank their grandparents for their birth and upbringing.</p>
<p>Reciprocally, the grandparents will impart words of  advice or wisdom to their grandchildren, encouraging them to study  seriously, to live in harmony with others. The promises made by the  children are similar to New Year&#8217;s resolutions made during the western  New Year. Adults will make silent promises to themselves to improve  their lives, habits and relationships in the coming year. The children  accept small gifts, usually crisp bills. Ideally, part of the gifts will  be saved for future &#8220;investment,&#8221; and part spent for Tet amusements.  The words on the little red envelope in which the bill may be tucked  read: Respectful wishes for the New Year. When there was a king ruling  Vietnam, the mandarins of the royal court formally wished the King and  Queen, &#8220;Happiness as vast as the southern sea; longevity as lasting as  the southern mountains.&#8221; Each trade and professional guild in Vietnam  has a founder or guardian spirit and on this or one of the next several  days, the craft workers will make offerings to their guild ancestor.</p>
<p>The family displays the offerings of food on the altar  table for the first meal for the ancestors since they have returned to  the world of the living. The head of the family, dressed in fresh  clothes, steps respectfully in front of the family altar and presents  the offerings of food, liquor, cigarettes, betel fixings, flowers and  paper gold and silver. He lights three sticks of incense, kneels, joins  hands in front of his chest, bows his head and prays. The names of the  deceased of the family up to the fifth generation are whispered as they  are invited to participate in the feast prepared for them.</p>
<p>After the ceremony, the entire family sits down to  enjoy the meal typically consisting of steamed chicken, bamboo shoot  soup, banh chung and fresh fruits. They reminisce with their ancestors.</p>
<p>The Vietnamese do not say &#8220;celebrate&#8221; when speaking of  Tet; the words &#8220;to eat&#8221; are used as in the expression, &#8220;Will you eat  Tet with your family?&#8221; or &#8220;Where will you eat Tet this year?&#8221; It does  not refer to the filling of one&#8217;s stomach, although in the old days,  when hunger was a constant problem, Tet time was a time of plenty during  which one could eat one&#8217;s full. &#8220;To eat&#8221; here means more to be  nourished by, or to partake in the mutual communion with others, a  spiritual eating or being nourished.</p>
<p>There is a  Vietnamese saying related to ancestor worship: &#8220;Trees have roots; water  has a source; when drinking from the spring, one must remember the  source.&#8221; Thanks are offered to those ancestors who labored long ago to  dig irrigation channels and remove mountains for this generation to have  an easier life. The present is only one link in the cycle of coming  back to the past as one looks to the future.</p>
<p><strong>The  second day</strong> of Tet is for visiting the wife&#8217;s family and close  friends. Some shops have opened and a few lottery stands are busy  selling chances to people who feel lucky. Everyone is out on the street  parading around in their new clothes.</p>
<p><strong>On  the third day</strong> of Tet, the circle of connections becomes larger  and is extended to the broader community outside the family by visits to  teachers, bosses or a helpful physician. The Vietnamese visit teachers  and physicians although long out of school and long cured of their  illness. This may be the time to have one&#8217;s fortune told to see what the  coming year will bring. These days in Vietnam, there are fortunetellers  using computer software. People are also especially interested in the  significance of their first dream of the new year.</p>
<p>The evening of the third day marks the departure of the  ancestors by burning votive objects such as gold and silver, for them  to take with them on their journey back to Heaven.</p>
<p>Now the connections to the world beyond the family can  take place. The non-family member who will be the first visitor is  carefully chosen. The &#8220;first footer&#8221; is an auspicious guest who is  considered to be good luck for the family. The first non-family visitor  to the house brings in the year&#8217;s luck. This figure&#8217;s karma will charm  the household for the entire year and determine the luck of the family.  It is customary to invite a respected person to visit at that time, so  that this turn of luck is not left to fate. This person, whose aura is  believed capable of promoting the fortune of the household in the  following year, is usually someone healthy, successful and prosperous.  Some Vietnamese lock their doors to all chance visitors until after the  visit of the chosen &#8220;first footer.&#8221;</p>
<p><strong>On  the fourth day</strong>, banks and shops reopen. Transactions, although  slower, will be conducted more cheerfully than usual. Offices open and  work resumes. Careful attention is paid to the resumption of activities.  The first outing is the first time in the New Year that a family leaves  their home. A propitious time is chosen in advance for this outing and  one sometimes asks the advice of fortunetellers.</p>
<p>Formerly,  scholars initiated their new brushes and paper with a small ceremony  with the wearing of new clothes. This also requires an auspicious hour.  The theme of the proverb or poem is considered carefully and newly  purchased high-grade paper was used. Today&#8217;s students are less formal in  their initiation rites, but most enjoy a new pen and a fresh notebook  for the New Year. Everyone determines to do what he or she can to help  fate along to make the next year most successful.</p>
<p>In  the countryside, there are rituals to enliven the land out of its  winter&#8217;s rest. The Rites of Dong Tho activate the soil to bring it alive  from its sacred rest. When there was a king in Vietnam, he symbolically  initiated the harrowing of the first furrow of the planting season in a  royal rite.</p>
<p>A hundred years ago, on Hang Buom  Street, a ceremony was performed right after Tet called the Beating of  the Spring Ox. This ceremony initiated the breaking open of the  agricultural land and chased away the winter cold. A ceramic image of  the ox was beaten with sticks until it broke into pieces. Everyone  scramble to grab and take home a piece of the sacred ox.</p>
<p><strong>On the fifteenth day</strong> of Tet (called  Ram Thang Gieng), the first full moon, there are ceremonies in Buddhist  temples. This is considered the most auspicious day of the Buddhist  year. &#8220;Paying homage to Buddha all year long is not as effective as  praying on the 15th day of the first lunar month.&#8221; The devout flock into  pagodas, their eyes stinging with the blue haze of incense. After  prayers, shared blessed offerings from the temple keeper are stuffed  into bags carried with them for that purpose. Over the years, this  Buddhist sacred day has transformed into a holiday of other cults.</p>
<p>It is also called Tet Trang Nguyen or the feast of the  first laureate. There is a legend associated with its beginnings: the  emperor once staged a banquet on the full moon to which the most  prominent scholars of the kingdom were invited. They drank exquisite  liquor and each man composed a formal poem on a theme chosen by the  emperor. On that day, many families celebrate Tet all over again by  eating banh chung.</p>
<p>This is also called the Little  New Year or full moon New Year and celebrated by farmers following an  indigenous practice of welcoming Spring at the first full moon. Later,  it became infused with Buddhist meanings.</p>
<p>The  Vietnamese traditionally celebrated Tet from the fifteenth day of the  twelfth month to the fifteenth day of the first month.</p>
<p>HAPPY LUNAR NEW YEAR!</p>
<p>CHÚC MỪNG NĂM MỚI</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dungle30.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dungle30.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dungle30.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dungle30.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dungle30.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dungle30.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dungle30.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dungle30.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dungle30.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dungle30.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dungle30.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dungle30.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dungle30.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dungle30.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dungle30.wordpress.com&amp;blog=12014610&amp;post=6&amp;subd=dungle30&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dungle30.wordpress.com/2010/02/14/happy-lunar-new-year-chuc-m%e1%bb%abng-nam-m%e1%bb%9bi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/11de8d2177bc0384fd31bca22c89d7d4?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">dungle30</media:title>
		</media:content>

		<media:content url="http://dungle30.files.wordpress.com/2010/02/newyear.jpg?w=300" medium="image">
			<media:title type="html">Happy Lunar New Year</media:title>
		</media:content>
	</item>
	</channel>
</rss>
