<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Alexey Rusakov on Sitecore development</title>
    <link>http://alexeyrusakov.com/sitecoreblog/</link>
    <description>Sitecore CMS and everything related</description>
    <language>en-us</language>
    <copyright>Alexey Rusakov</copyright>
    <lastBuildDate>Sat, 15 Nov 2008 14:19:55 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>ar@sitecore.net</managingEditor>
    <webMaster>ar@sitecore.net</webMaster>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/alexeyrusakov/sitecore" type="application/rss+xml" /><item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=8e7c7b46-be6c-4659-a860-82a1bf711077</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,8e7c7b46-be6c-4659-a860-82a1bf711077.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,8e7c7b46-be6c-4659-a860-82a1bf711077.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=8e7c7b46-be6c-4659-a860-82a1bf711077</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This post continues the series about the new field editing infrastructure introduced
in Sitecore 6: I’ve talked about the <a href="http://alexeyrusakov.com/sitecoreblog/2008/09/15/The+RenderField+Pipeline.aspx">renderField
pipeline</a>, and <a href="http://alexeyrusakov.com/sitecoreblog/2008/09/18/Rendering+Fields+In+Sitecore+6+Using+NET.aspx">how
you should be using renderField from .NET</a>. Today is the example day.
</p>
        <p>
Let’s start with links. You can put sc:Link control directly on the aspx page:
</p>
        <p>
&lt;sc:Link Field="Link" runat="server" /&gt;
</p>
        <p>
This is a minimum set of parameters – you need to specify the field name at least.
The control will use context item to get the field value. If you need any other item,
you can use Datasource property in a declarative manner:
</p>
        <p>
&lt;sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server" /&gt;
</p>
        <p>
To change the text of the link, you can use the <em>Text</em> property, but Link control
is also able to render embedded content:
</p>
        <p>
&lt;sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server"&gt;<br />
  Link text<br />
&lt;/sc:Link&gt;
</p>
        <p>
And of course  it can render child controls:
</p>
        <p>
&lt;sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server"&gt;<br />
  &lt;sc:Image MaxWidth="200" MaxHeight="200" Field="Image" runat="server" /&gt;<br />
&lt;/sc:Link&gt; 
</p>
        <p>
The same using C#: 
</p>
        <pre>var link = new Link {Field = "Link", Item = Sitecore.Context.Database.GetItem(someId)};
var image = new Sitecore.Web.UI.WebControls.Image {Field = "Image", MaxWidth = 200, MaxHeight = 200};
link.Controls.Add(image);

MainPanel.Controls.Add(link);
</pre>
        <p>
Notice that controls also have the <em>Item</em> property. The difference between <em>Item</em> and <em>DataSource</em> is
that one is designed for API use and accepts Item class, and the other is designed
for declarative use and accepts strings.
</p>
        <p>
All of the examples above support Page Editor, including the image nested inside link.
</p>
        <img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=8e7c7b46-be6c-4659-a860-82a1bf711077" />
      <xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/454023309" height="1" width="1" /></body>
      <title>Using FieldControls in .NET: Examples</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,8e7c7b46-be6c-4659-a860-82a1bf711077.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/11/15/Using+FieldControls+In+NET+Examples.aspx</link>
      <pubDate>Sat, 15 Nov 2008 14:19:55 GMT</pubDate>
      <description>&lt;p&gt;
This post continues the series about the new field editing infrastructure introduced
in Sitecore 6: I’ve talked about the &lt;a href="http://alexeyrusakov.com/sitecoreblog/2008/09/15/The+RenderField+Pipeline.aspx"&gt;renderField
pipeline&lt;/a&gt;, and &lt;a href="http://alexeyrusakov.com/sitecoreblog/2008/09/18/Rendering+Fields+In+Sitecore+6+Using+NET.aspx"&gt;how
you should be using renderField from .NET&lt;/a&gt;. Today is the example day.
&lt;/p&gt;
&lt;p&gt;
Let’s start with links. You can put sc:Link control directly on the aspx page:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;sc:Link Field="Link" runat="server" /&amp;gt;
&lt;/p&gt;
&lt;p&gt;
This is a minimum set of parameters – you need to specify the field name at least.
The control will use context item to get the field value. If you need any other item,
you can use Datasource property in a declarative manner:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server" /&amp;gt;
&lt;/p&gt;
&lt;p&gt;
To change the text of the link, you can use the &lt;em&gt;Text&lt;/em&gt; property, but Link control
is also able to render embedded content:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server"&amp;gt;&lt;br&gt;
&amp;nbsp; Link text&lt;br&gt;
&amp;lt;/sc:Link&amp;gt;
&lt;/p&gt;
&lt;p&gt;
And of course&amp;nbsp; it can render child controls:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;sc:Image MaxWidth="200" MaxHeight="200" Field="Image" runat="server" /&amp;gt;&lt;br&gt;
&amp;lt;/sc:Link&amp;gt; 
&lt;p&gt;
The same using C#: &lt;pre&gt;var link = new Link {Field = "Link", Item = Sitecore.Context.Database.GetItem(someId)};
var image = new Sitecore.Web.UI.WebControls.Image {Field = "Image", MaxWidth = 200, MaxHeight = 200};
link.Controls.Add(image);

MainPanel.Controls.Add(link);
&lt;/pre&gt;
&lt;p&gt;
Notice that controls also have the &lt;em&gt;Item&lt;/em&gt; property. The difference between &lt;em&gt;Item&lt;/em&gt; and &lt;em&gt;DataSource&lt;/em&gt; is
that one is designed for API use and accepts Item class, and the other is designed
for declarative use and accepts strings.
&lt;/p&gt;
&lt;p&gt;
All of the examples above support Page Editor, including the image nested inside link.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=8e7c7b46-be6c-4659-a860-82a1bf711077" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,8e7c7b46-be6c-4659-a860-82a1bf711077.aspx</comments>
      <category>Sitecore</category>
      <category>Sitecore/Crestone</category>
    </item>
    <item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=f3ca3a5b-3a46-4e76-9c66-1c4589c87fde</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,f3ca3a5b-3a46-4e76-9c66-1c4589c87fde.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,f3ca3a5b-3a46-4e76-9c66-1c4589c87fde.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=f3ca3a5b-3a46-4e76-9c66-1c4589c87fde</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’m starting on twitter at <a title="http://twitter.com/a_rusakov" href="http://twitter.com/a_rusakov">http://twitter.com/a_rusakov</a> –
I’ll experiment with format and content, but the primary focus is still Sitecore and
everything related to it. It will not interfere with this blog, but hopefully supplement
it in a useful way.
</p>
        <p>
Twitter is a micro blogging platform, most known for limiting the length of one message
(“update” or “tweet”) to 140 symbols, which dictates its own format. However twitter
has also grown to a social platform with its unique flavor, supporting public conversations.
</p>
        <p>
If you don’t want to use twitter but would still like to subscribe to (“follow”) my
updates, you can use RSS.
</p>
        <img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=f3ca3a5b-3a46-4e76-9c66-1c4589c87fde" />
      <xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/440841027" height="1" width="1" /></body>
      <title>Expanding to Twitter</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,f3ca3a5b-3a46-4e76-9c66-1c4589c87fde.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/11/03/Expanding+To+Twitter.aspx</link>
      <pubDate>Mon, 03 Nov 2008 10:39:04 GMT</pubDate>
      <description>&lt;p&gt;
I’m starting on twitter at &lt;a title="http://twitter.com/a_rusakov" href="http://twitter.com/a_rusakov"&gt;http://twitter.com/a_rusakov&lt;/a&gt; –
I’ll experiment with format and content, but the primary focus is still Sitecore and
everything related to it. It will not interfere with this blog, but hopefully supplement
it in a useful way.
&lt;/p&gt;
&lt;p&gt;
Twitter is a micro blogging platform, most known for limiting the length of one message
(“update” or “tweet”) to 140 symbols, which dictates its own format. However twitter
has also grown to a social platform with its unique flavor, supporting public conversations.
&lt;/p&gt;
&lt;p&gt;
If you don’t want to use twitter but would still like to subscribe to (“follow”) my
updates, you can use RSS.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=f3ca3a5b-3a46-4e76-9c66-1c4589c87fde" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,f3ca3a5b-3a46-4e76-9c66-1c4589c87fde.aspx</comments>
      <category>Personal</category>
      <category>Sitecore</category>
    </item>
    <item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=09de1d8f-daa5-401b-9068-6786159229ea</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,09de1d8f-daa5-401b-9068-6786159229ea.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,09de1d8f-daa5-401b-9068-6786159229ea.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=09de1d8f-daa5-401b-9068-6786159229ea</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://sdn.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/Update/6_0_0_rev_081022.aspx">Sitecore
6 Update 6</a> is released, and the only fix is the support for uploading files with
Flash 10 installed.
</p>
        <p>
          <a href="http://sdn.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/Update/6_0_0_rev_081022.aspx">Download</a>.
</p>
        <p>
        </p>
        <p>
A little bit of insight: you probably heard that Adobe has introduced a new “security”
rule in Flash 10 that says that Open file dialog can only be shown in a response to
user interaction in flash. The rule effectively broke all javascript/flash uploaders,
including the one we’ve used. The simplest hack around that rule is to overlay your
HTML UI with a transparent flash object, and the updated flash-10-supporting libraries
allow this overlay to be created using javascript.
</p>
        <p>
As a positive side effect of having to redo the upload UI, uploading from media folder
should open somewhat faster now. I’ve also switched our underlying library from SWFupload
to YUIupload, which seemed like a better supported project.
</p>
        <img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=09de1d8f-daa5-401b-9068-6786159229ea" />
      <xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/439490998" height="1" width="1" /></body>
      <title>Sitecore 6 Update-6 Released (Fixes Flash 10)</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,09de1d8f-daa5-401b-9068-6786159229ea.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/11/01/Sitecore+6+Update6+Released+Fixes+Flash+10.aspx</link>
      <pubDate>Sat, 01 Nov 2008 23:12:35 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://sdn.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/Update/6_0_0_rev_081022.aspx"&gt;Sitecore
6 Update 6&lt;/a&gt; is released, and the only fix is the support for uploading files with
Flash 10 installed.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://sdn.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/Update/6_0_0_rev_081022.aspx"&gt;Download&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
A little bit of insight: you probably heard that Adobe has introduced a new “security”
rule in Flash 10 that says that Open file dialog can only be shown in a response to
user interaction in flash. The rule effectively broke all javascript/flash uploaders,
including the one we’ve used. The simplest hack around that rule is to overlay your
HTML UI with a transparent flash object, and the updated flash-10-supporting libraries
allow this overlay to be created using javascript.
&lt;/p&gt;
&lt;p&gt;
As a positive side effect of having to redo the upload UI, uploading from media folder
should open somewhat faster now. I’ve also switched our underlying library from SWFupload
to YUIupload, which seemed like a better supported project.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=09de1d8f-daa5-401b-9068-6786159229ea" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,09de1d8f-daa5-401b-9068-6786159229ea.aspx</comments>
      <category>Sitecore</category>
      <category>Web development</category>
    </item>
    <item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=4e0629c8-c4bf-428d-8a4d-ee4e2cca6db3</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,4e0629c8-c4bf-428d-8a4d-ee4e2cca6db3.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,4e0629c8-c4bf-428d-8a4d-ee4e2cca6db3.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=4e0629c8-c4bf-428d-8a4d-ee4e2cca6db3</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I’ve made google chrome a default browser on my laptop and work PC. I’ve noticed
that I was spending more and more time in chrome for casual browsing, and when someone
IMs me a link, waiting for Firefox to load is just a waste of time. Speed and sumplicity 
finally won me over firefox addins.
</p>
        <p>
From now on, it’s IE for Sitecore, Firefox for firebug and Chrome for everything else.
</p>
        <img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=4e0629c8-c4bf-428d-8a4d-ee4e2cca6db3" />
      <xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/429657639" height="1" width="1" /></body>
      <title>One for Google Chrome</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,4e0629c8-c4bf-428d-8a4d-ee4e2cca6db3.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/10/23/One+For+Google+Chrome.aspx</link>
      <pubDate>Thu, 23 Oct 2008 13:54:55 GMT</pubDate>
      <description>&lt;p&gt;
Today I’ve made google chrome a default browser on my laptop and work PC. I’ve noticed
that I was spending more and more time in chrome for casual browsing, and when someone
IMs me a link, waiting for Firefox to load is just a waste of time. Speed and sumplicity&amp;nbsp;
finally won me over firefox addins.
&lt;/p&gt;
&lt;p&gt;
From now on, it’s IE for Sitecore, Firefox for firebug and Chrome for everything else.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=4e0629c8-c4bf-428d-8a4d-ee4e2cca6db3" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,4e0629c8-c4bf-428d-8a4d-ee4e2cca6db3.aspx</comments>
      <category>Personal</category>
      <category>User Experience</category>
    </item>
    <item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=2a75518d-dc19-4a96-8583-95344ff8b5f5</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,2a75518d-dc19-4a96-8583-95344ff8b5f5.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,2a75518d-dc19-4a96-8583-95344ff8b5f5.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=2a75518d-dc19-4a96-8583-95344ff8b5f5</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We’ve released a <a href="http://trac.sitecore.net/Poll/wiki/WikiStart">major overhaul
of the poll module</a>. Improvements:
</p>
        <ul>
          <li>
Sitecore 6 support, including using Page Editor to modify existing polls 
</li>
          <li>
New polls can be added using Sitecore 6 Page Editor 
</li>
          <li>
Staging support 
</li>
          <li>
AJAX voting 
</li>
          <li>
Fully automated installation 
</li>
          <li>
Simplified architecture: the module no longer uses an additional database, which also
allowed us to completely remove the settings application 
</li>
          <li>
Better looks 
</li>
          <li>
Easier customization: we’re using more xhtml and css, and less tables. Instead of
c# webcontrol code, we’re using an ascx sublayout that is much easier to tweak without
having to compile the code 
</li>
          <li>
Refactored code and reviewed design 
</li>
        </ul>
        <p>
The Poll module is part of Sitecore shared source program, and it stays that way.
However we’ve dedicated our QA and development to reshape the module and release a
clean and well tested Sitecore 6 version. We used the same open svn/trac server for
entire development process, and you can see <a href="http://trac.sitecore.net/Poll/timeline">change
history</a>.
</p>
        <p>
From now on, the module continues its life as a shared source component, meaning that
you can (and very welcome to) contribute. I was doing product management type of work
on the project, while Michael Baranov gets all the praise for beautifying the code. 
</p>
        <p>
My favorite feature is the ability to add new polls directly through the Sitecore
6 Page Editor.
</p>
        <p>
          <strong>1. Click “Insert Poll” </strong>
        </p>
        <p>
          <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="163" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_6.png" width="443" border="0" />
        </p>
        <p>
          <strong>2. Setup poll using a pop-up wizard</strong>
          <br />
          <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="342" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_5.png" width="520" border="0" />
        </p>
        <p>
          <strong>3. Select a placeholder</strong>
        </p>
        <p>
          <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="558" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_9.png" width="516" border="0" />
        </p>
        <p>
          <strong>4. Done</strong>.
</p>
        <p>
You can also edit existing polls from the Page Editor:
</p>
        <p>
          <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="170" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_14.png" width="257" border="0" />
        </p>
        <p>
Content layout is changed, so that you’re no longer required to store all polls in
a single location. This setup beautifully supports multisite solutions.
</p>
        <p>
          <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="289" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_17.png" width="201" border="0" />
        </p>
        <p>
And bugs, <a href="http://trac.sitecore.net/Poll/report/6">lots of bugs were fixed</a>:
</p>
        <p>
          <img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="208" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_23.png" width="418" border="0" />
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
 
</p>
        <p>
Hope you like the update. Downloads, documentation and source code are all available
at <a title="http://trac.sitecore.net/Poll" href="http://trac.sitecore.net/Poll">http://trac.sitecore.net/Poll</a>.
</p>
        <img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=2a75518d-dc19-4a96-8583-95344ff8b5f5" />
      <xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/428670429" height="1" width="1" /></body>
      <title>Poll Module Version 3 is Released</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,2a75518d-dc19-4a96-8583-95344ff8b5f5.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/10/22/Poll+Module+Version+3+Is+Released.aspx</link>
      <pubDate>Wed, 22 Oct 2008 15:13:12 GMT</pubDate>
      <description>&lt;p&gt;
We’ve released a &lt;a href="http://trac.sitecore.net/Poll/wiki/WikiStart"&gt;major overhaul
of the poll module&lt;/a&gt;. Improvements:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Sitecore 6 support, including using Page Editor to modify existing polls 
&lt;li&gt;
New polls can be added using Sitecore 6 Page Editor 
&lt;li&gt;
Staging support 
&lt;li&gt;
AJAX voting 
&lt;li&gt;
Fully automated installation 
&lt;li&gt;
Simplified architecture: the module no longer uses an additional database, which also
allowed us to completely remove the settings application 
&lt;li&gt;
Better looks 
&lt;li&gt;
Easier customization: we’re using more xhtml and css, and less tables. Instead of
c# webcontrol code, we’re using an ascx sublayout that is much easier to tweak without
having to compile the code 
&lt;li&gt;
Refactored code and reviewed design 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The Poll module is part of Sitecore shared source program, and it stays that way.
However we’ve dedicated our QA and development to reshape the module and release a
clean and well tested Sitecore 6 version. We used the same open svn/trac server for
entire development process, and you can see &lt;a href="http://trac.sitecore.net/Poll/timeline"&gt;change
history&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
From now on, the module continues its life as a shared source component, meaning that
you can (and very welcome to) contribute. I was doing product management type of work
on the project, while Michael Baranov gets all the praise for beautifying the code. 
&lt;/p&gt;
&lt;p&gt;
My favorite feature is the ability to add new polls directly through the Sitecore
6 Page Editor.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;1. Click “Insert Poll” &lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="163" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_6.png" width="443" border="0"&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;2. Setup poll using a pop-up wizard&lt;/strong&gt;
&lt;br&gt;
&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="342" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_5.png" width="520" border="0"&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;3. Select a placeholder&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="558" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_9.png" width="516" border="0"&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;4. Done&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
You can also edit existing polls from the Page Editor:
&lt;/p&gt;
&lt;p&gt;
&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="170" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_14.png" width="257" border="0"&gt; 
&lt;/p&gt;
&lt;p&gt;
Content layout is changed, so that you’re no longer required to store all polls in
a single location. This setup beautifully supports multisite solutions.
&lt;/p&gt;
&lt;p&gt;
&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="289" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_17.png" width="201" border="0"&gt; 
&lt;/p&gt;
&lt;p&gt;
And bugs, &lt;a href="http://trac.sitecore.net/Poll/report/6"&gt;lots of bugs were fixed&lt;/a&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="208" alt="image" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/PollModuleVersion3isReleased_FADD/image_23.png" width="418" border="0"&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Hope you like the update. Downloads, documentation and source code are all available
at &lt;a title="http://trac.sitecore.net/Poll" href="http://trac.sitecore.net/Poll"&gt;http://trac.sitecore.net/Poll&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=2a75518d-dc19-4a96-8583-95344ff8b5f5" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,2a75518d-dc19-4a96-8583-95344ff8b5f5.aspx</comments>
      <category>Sitecore</category>
      <category>Sitecore/Open Source</category>
    </item>
    <item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=767a469a-2112-49e4-aa8c-27fd9a07a54b</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,767a469a-2112-49e4-aa8c-27fd9a07a54b.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,767a469a-2112-49e4-aa8c-27fd9a07a54b.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=767a469a-2112-49e4-aa8c-27fd9a07a54b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’m attending my first PDC this year, and I’m definitely up for a few drinks – let
me know if you’re around. Email’s alexey at this domain.
</p>
        <p>
Not quite sure what to expect from the conference –  looking forward to C# 4.0,
User Experience and Silverlight talks.
</p>
        <img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=767a469a-2112-49e4-aa8c-27fd9a07a54b" />
      <xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/427258273" height="1" width="1" /></body>
      <title>PDC 2008</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,767a469a-2112-49e4-aa8c-27fd9a07a54b.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/10/21/PDC+2008.aspx</link>
      <pubDate>Tue, 21 Oct 2008 08:00:30 GMT</pubDate>
      <description>&lt;p&gt;
I’m attending my first PDC this year, and I’m definitely up for a few drinks – let
me know if you’re around. Email’s alexey at this domain.
&lt;/p&gt;
&lt;p&gt;
Not quite sure what to expect from the conference –&amp;nbsp; looking forward to C# 4.0,
User Experience and Silverlight talks.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=767a469a-2112-49e4-aa8c-27fd9a07a54b" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,767a469a-2112-49e4-aa8c-27fd9a07a54b.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=99f868a3-6ead-4c4b-b024-619bd5a55699</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,99f868a3-6ead-4c4b-b024-619bd5a55699.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,99f868a3-6ead-4c4b-b024-619bd5a55699.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=99f868a3-6ead-4c4b-b024-619bd5a55699</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://sdn5.sitecore.net/products/sitecore%20v5/sitecore%20cms%206/releasenotes/changelog.aspx">Changes</a>:
</p>
        <blockquote>
          <p>
            <em>Issues fixed: </em>
          </p>
          <ol>
            <li>
              <p>
                <em>Fixed: Cross site links were not working as expected. Such links now include the
hostname of the target site and are generated relative to the start item of the target
site. This functionality can be disabled by setting Rendering.SiteResolving to “false”
in the web.config file.</em>
              </p>
            </li>
            <li>
              <p>
                <em>Fixed: a selected Publishing Target of an item was not taken into account when
performing Publish operations.</em>
              </p>
            </li>
            <li>
              <p>
                <em>Fixed: The performance of item creation has been significantly improved.</em>
              </p>
            </li>
          </ol>
          <p>
            <em>New features:</em>
          </p>
          <ol>
            <li>
              <em>The FastQueryDescendantsDisabled setting has been added to the web.config file.
It may be set to true to disable the ability to use fast query to select items through
Ancestors/Descendants axes. This will give a small performance increase of item creation/moving/deletion. </em>
            </li>
          </ol>
          <p>
 
</p>
        </blockquote>
        <p>
          <a href="http://sdn5.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/Update/6_0_0_rev_081009.aspx">Download</a>.
</p>
        <img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=99f868a3-6ead-4c4b-b024-619bd5a55699" />
      <xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/423496428" height="1" width="1" /></body>
      <title>Sitecore 6 Update-5 Released</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,99f868a3-6ead-4c4b-b024-619bd5a55699.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/10/17/Sitecore+6+Update5+Released.aspx</link>
      <pubDate>Fri, 17 Oct 2008 08:12:02 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://sdn5.sitecore.net/products/sitecore%20v5/sitecore%20cms%206/releasenotes/changelog.aspx"&gt;Changes&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;em&gt;Issues fixed: &lt;/em&gt; 
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;
&lt;em&gt;Fixed: Cross site links were not working as expected. Such links now include the
hostname of the target site and are generated relative to the start item of the target
site. This functionality can be disabled by setting Rendering.SiteResolving to “false”
in the web.config file.&lt;/em&gt;
&lt;/p&gt;
&lt;li&gt;
&lt;p&gt;
&lt;em&gt;Fixed: a selected Publishing Target of an item was not taken into account when
performing Publish operations.&lt;/em&gt;
&lt;/p&gt;
&lt;li&gt;
&lt;p&gt;
&lt;em&gt;Fixed: The performance of item creation has been significantly improved.&lt;/em&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;em&gt;New features:&lt;/em&gt; 
&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;The FastQueryDescendantsDisabled setting has been added to the web.config file.
It may be set to true to disable the ability to use fast query to select items through
Ancestors/Descendants axes. This will give a small performance increase of item creation/moving/deletion. &lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;a href="http://sdn5.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/Update/6_0_0_rev_081009.aspx"&gt;Download&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=99f868a3-6ead-4c4b-b024-619bd5a55699" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,99f868a3-6ead-4c4b-b024-619bd5a55699.aspx</comments>
      <category>Sitecore</category>
    </item>
    <item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=046e41c0-6f9b-4c91-aea7-61ae7690d482</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,046e41c0-6f9b-4c91-aea7-61ae7690d482.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,046e41c0-6f9b-4c91-aea7-61ae7690d482.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=046e41c0-6f9b-4c91-aea7-61ae7690d482</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Adobe released Flash player version 10 that breaks uploading in Sitecore. 
</p>
        <p>
We’re working on a solution,  do not upgrade to Flash 10 if you can. Another
option is to set Upload.Classic = “true” option in web.config – this will replace
Sitecore 6 upload with the one used in Sitecore 5, which doesn’t rely on flash.
</p>
        <img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=046e41c0-6f9b-4c91-aea7-61ae7690d482" />
      <xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/422554671" height="1" width="1" /></body>
      <title>Sitecore Upload and Flash Player 10</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,046e41c0-6f9b-4c91-aea7-61ae7690d482.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/10/16/Sitecore+Upload+And+Flash+Player+10.aspx</link>
      <pubDate>Thu, 16 Oct 2008 11:05:11 GMT</pubDate>
      <description>&lt;p&gt;
Adobe released Flash player version 10 that breaks uploading in Sitecore. 
&lt;/p&gt;
&lt;p&gt;
We’re working on a solution,&amp;nbsp; do not upgrade to Flash 10 if you can. Another
option is to set Upload.Classic = “true” option in web.config – this will replace
Sitecore 6 upload with the one used in Sitecore 5, which doesn’t rely on flash.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=046e41c0-6f9b-4c91-aea7-61ae7690d482" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,046e41c0-6f9b-4c91-aea7-61ae7690d482.aspx</comments>
      <category>Sitecore</category>
    </item>
    <item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=a8a51419-4403-42c4-b689-56553d4165cc</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,a8a51419-4403-42c4-b689-56553d4165cc.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,a8a51419-4403-42c4-b689-56553d4165cc.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=a8a51419-4403-42c4-b689-56553d4165cc</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <img title="Getting sublayout parameters in Sitecore 5" style="border-right: 0px; border-top: 0px; display: inline; margin-left: 0px; border-left: 0px; margin-right: 0px; border-bottom: 0px" height="167" alt="Getting sublayout parameters in Sitecore 5" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/GetSublayoutParametersinSitecore6_C6A2/image_3.png" width="484" align="right" border="0" />
        <p>
One of the <a href="http://sdn5.sitecore.net/FAQ/API/Get%20DataSource%20Code%20and%20Parameters%20for%20Sublayout%20via%20Code-behind.aspx">popular
questions</a> about Sitecore is how to get sublayout parameters. Sitecore 5 way of
doing that involves advanced API – parsing layout definition for the current item,
finding the rendering item, etc.
</p>
        <p>
Sitecore 6 makes this simple enough to remember – the parameter string is stored as
a “sc_parameters” attribute of the sublayout.
</p>
        <p>
string rawParameters = Attributes[“sc_parameters”];<br />
NameValueCollection parameters = Sitecore.Web.WebUtil.ParseUrlParameters(rawParameters);
</p>
        <img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=a8a51419-4403-42c4-b689-56553d4165cc" />
      <xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/420445065" height="1" width="1" /></body>
      <title>Get Sublayout Parameters in Sitecore 6</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,a8a51419-4403-42c4-b689-56553d4165cc.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/10/14/Get+Sublayout+Parameters+In+Sitecore+6.aspx</link>
      <pubDate>Tue, 14 Oct 2008 11:07:29 GMT</pubDate>
      <description>&lt;img title="Getting sublayout parameters in Sitecore 5" style="border-right: 0px; border-top: 0px; display: inline; margin-left: 0px; border-left: 0px; margin-right: 0px; border-bottom: 0px" height="167" alt="Getting sublayout parameters in Sitecore 5" src="http://alexeyrusakov.com/sitecoreblog/content/binary/WindowsLiveWriter/GetSublayoutParametersinSitecore6_C6A2/image_3.png" width="484" align="right" border="0"&gt; 
&lt;p&gt;
One of the &lt;a href="http://sdn5.sitecore.net/FAQ/API/Get%20DataSource%20Code%20and%20Parameters%20for%20Sublayout%20via%20Code-behind.aspx"&gt;popular
questions&lt;/a&gt; about Sitecore is how to get sublayout parameters. Sitecore 5 way of
doing that involves advanced API – parsing layout definition for the current item,
finding the rendering item, etc.
&lt;/p&gt;
&lt;p&gt;
Sitecore 6 makes this simple enough to remember – the parameter string is stored as
a “sc_parameters” attribute of the sublayout.
&lt;/p&gt;
&lt;p&gt;
string rawParameters = Attributes[“sc_parameters”];&lt;br&gt;
NameValueCollection parameters = Sitecore.Web.WebUtil.ParseUrlParameters(rawParameters);
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=a8a51419-4403-42c4-b689-56553d4165cc" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,a8a51419-4403-42c4-b689-56553d4165cc.aspx</comments>
      <category>Sitecore</category>
      <category>Sitecore/Crestone</category>
    </item>
    <item>
      <trackback:ping>http://alexeyrusakov.com/sitecoreblog/Trackback.aspx?guid=21e62bae-7479-4099-89e3-109a97c11c62</trackback:ping>
      <pingback:server>http://alexeyrusakov.com/sitecoreblog/pingback.aspx</pingback:server>
      <pingback:target>http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,21e62bae-7479-4099-89e3-109a97c11c62.aspx</pingback:target>
      <dc:creator>Alexey Rusakov</dc:creator>
      <wfw:comment>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,21e62bae-7479-4099-89e3-109a97c11c62.aspx</wfw:comment>
      <wfw:commentRss>http://alexeyrusakov.com/sitecoreblog/SyndicationService.asmx/GetEntryCommentsRss?guid=21e62bae-7479-4099-89e3-109a97c11c62</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I’ll go with the example suggested by Lars. Suppose we’re implementing a new <em>money</em> field
type to store both the numeric amount and the currency (229 US Dollars). Both bits
of information are stored in a single field using XML, which is a typical approach
for Sitecore.
</p>
        <p>
I’ll skip the whole <a href="http://sdn5.sitecore.net/Articles/API/Creating%20a%20Composite%20Custom%20Field.aspx">implementing
a new field type</a> part (no need to repeat SDN); lets say that the Sitecore Client
part is already implemented, and editors are able to use the Content Editor to change
field value.
</p>
        <p>
One problem remains – how to output <em>money</em> values on the website? The field
contains XML, so we can’t just do <em>sc:fld(‘money’, .)</em>. Different currencies
have different signs which can go before or after the amount, which makes non-trivial
rendering logic. The typical Sitecore 5 solution would be to implement a new XSL extension
method and/or .NET web control. 
</p>
        <p>
In Sitecore 6, however, you can use the renderField pipeline to make existing rendering
methods properly render custom field types.
</p>
        <p>
Once again, this is a clean <em>renderField</em> pipeline:
</p>
        <p>
&lt;renderField&gt;<br />
  &lt;processor type="Sitecore.Pipelines.RenderField.GetFieldValue, Sitecore.Kernel"/&gt;<br />
  &lt;processor type="Sitecore.Pipelines.RenderField.ExpandLinks, Sitecore.Kernel"/&gt;<br />
  &lt;processor type="Sitecore.Pipelines.RenderField.GetImageFieldValue, Sitecore.Kernel"/&gt;<br />
  &lt;processor type="Sitecore.Pipelines.RenderField.GetLinkFieldValue, Sitecore.Kernel"/&gt;<br />
  &lt;processor type="Sitecore.Pipelines.RenderField.GetInternalLinkFieldValue,
Sitecore.Kernel"/&gt;<br />
  &lt;processor type="Sitecore.Pipelines.RenderField.GetMemoFieldValue, Sitecore.Kernel"/&gt;<br />
  &lt;processor type="Sitecore.Pipelines.RenderField.GetDateFieldValue, Sitecore.Kernel"/&gt;<br />
  &lt;processor type="Sitecore.Pipelines.RenderField.AddBeforeAndAfterValues,
Sitecore.Kernel"/&gt;<br />
  &lt;processor type="Sitecore.Pipelines.RenderField.RenderWebEditing, Sitecore.Kernel"/&gt;<br />
&lt;/renderField&gt; 
</p>
        <p>
Most processors are responsible for rendering specific field types, plus there are
some additional processors supporting Sitecore architecture.
</p>
        <p>
Following the naming convention, we’ll create a new GetMoneyFieldValue processor and
place it after all Get* processors, but before the AddBeforeAndAfterValues:
</p>
        <p>
        </p>
  &lt;processor type="Sitecore.Pipelines.RenderField.GetDateFieldValue, Sitecore.Kernel"/&gt;<br />
  <strong>&lt;processor type="Money.GetMoneyFieldValue, Money" /&gt;</strong><br />
  &lt;processor type="Sitecore.Pipelines.RenderField.AddBeforeAndAfterValues,
Sitecore.Kernel"/&gt; 
<p /><p>
The processor responsibility is to render HTML. I’m assuming that money field contains
the following XML: &lt;money currency=”USD” amount=”229.99” /&gt;
</p><pre>public class GetMoneyFieldValue {
  public void Process(RenderFieldArgs args) {
    if (args.FieldTypeKey != "money") {
      return;
    }

    var doc = new XmlDocument();
    doc.LoadXml(args.FieldValue);

    string currency = doc.DocumentElement.GetAttribute("currency");
    string amount = doc.DocumentElement.GetAttribute("amount");

    string result = string.Empty;

    if (currency == "USD") {
      result = "$" + amount;
    }
    else if (currency == "DKK") {
      result = amount + " kr.";
    }

    args.Result.FirstPart = result;
  }
}
</pre><p>
First, and most importantly, the processor has to check the type of the field being
rendered. It’s only supposed to render <em>money</em> fields and ignore everything
else. Then we retrieve the field value – notice the FieldValue property. The value
is parsed, and depending on the currency we nicely render the monetary amount of either
American dollars or Danish kroner. The result is stored in args.Result.FirstPart - <em>money</em> field
is not supposed to be able to wrap other values, so nevermind the LastPart.
</p><h3>Why Bother?
</h3><p>
Implementing the above processor gives website developers the ability to use standard
Sitecore field rendering methods to properly render <em>money</em> fields. Developers
can do <em>sc:field(‘money’, .)</em> or use the <em>FieldRenderer</em> class and never
have a second thought.
</p><img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=21e62bae-7479-4099-89e3-109a97c11c62" /><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/alexeyrusakov/sitecore/~4/415843147" height="1" width="1" /></body>
      <title>Using renderField to Support New Field Types</title>
      <guid isPermaLink="false">http://alexeyrusakov.com/sitecoreblog/PermaLink,guid,21e62bae-7479-4099-89e3-109a97c11c62.aspx</guid>
      <link>http://alexeyrusakov.com/sitecoreblog/2008/10/09/Using+RenderField+To+Support+New+Field+Types.aspx</link>
      <pubDate>Thu, 09 Oct 2008 20:57:00 GMT</pubDate>
      <description>&lt;p&gt;
Today I’ll go with the example suggested by Lars. Suppose we’re implementing a new &lt;em&gt;money&lt;/em&gt; field
type to store both the numeric amount and the currency (229 US Dollars). Both bits
of information are stored in a single field using XML, which is a typical approach
for Sitecore.
&lt;/p&gt;
&lt;p&gt;
I’ll skip the whole &lt;a href="http://sdn5.sitecore.net/Articles/API/Creating%20a%20Composite%20Custom%20Field.aspx"&gt;implementing
a new field type&lt;/a&gt; part (no need to repeat SDN); lets say that the Sitecore Client
part is already implemented, and editors are able to use the Content Editor to change
field value.
&lt;/p&gt;
&lt;p&gt;
One problem remains – how to output &lt;em&gt;money&lt;/em&gt; values on the website? The field
contains XML, so we can’t just do &lt;em&gt;sc:fld(‘money’, .)&lt;/em&gt;. Different currencies
have different signs which can go before or after the amount, which makes non-trivial
rendering logic. The typical Sitecore 5 solution would be to implement a new XSL extension
method and/or .NET web control. 
&lt;/p&gt;
&lt;p&gt;
In Sitecore 6, however, you can use the renderField pipeline to make existing rendering
methods properly render custom field types.
&lt;/p&gt;
&lt;p&gt;
Once again, this is a clean &lt;em&gt;renderField&lt;/em&gt; pipeline:
&lt;/p&gt;
&lt;p&gt;
&amp;lt;renderField&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.GetFieldValue, Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.ExpandLinks, Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.GetImageFieldValue, Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.GetLinkFieldValue, Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.GetInternalLinkFieldValue,
Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.GetMemoFieldValue, Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.GetDateFieldValue, Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.AddBeforeAndAfterValues,
Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.RenderWebEditing, Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;lt;/renderField&amp;gt; 
&lt;p&gt;
Most processors are responsible for rendering specific field types, plus there are
some additional processors supporting Sitecore architecture.
&lt;/p&gt;
&lt;p&gt;
Following the naming convention, we’ll create a new GetMoneyFieldValue processor and
place it after all Get* processors, but before the AddBeforeAndAfterValues:
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.GetDateFieldValue, Sitecore.Kernel"/&amp;gt;&lt;br&gt;
&amp;nbsp; &lt;strong&gt;&amp;lt;processor type="Money.GetMoneyFieldValue, Money" /&amp;gt;&lt;/strong&gt;
&lt;br&gt;
&amp;nbsp; &amp;lt;processor type="Sitecore.Pipelines.RenderField.AddBeforeAndAfterValues,
Sitecore.Kernel"/&amp;gt; 
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
The processor responsibility is to render HTML. I’m assuming that money field contains
the following XML: &amp;lt;money currency=”USD” amount=”229.99” /&amp;gt;
&lt;/p&gt;
&lt;pre&gt;public class GetMoneyFieldValue {
  public void Process(RenderFieldArgs args) {
    if (args.FieldTypeKey != "money") {
      return;
    }

    var doc = new XmlDocument();
    doc.LoadXml(args.FieldValue);

    string currency = doc.DocumentElement.GetAttribute("currency");
    string amount = doc.DocumentElement.GetAttribute("amount");

    string result = string.Empty;

    if (currency == "USD") {
      result = "$" + amount;
    }
    else if (currency == "DKK") {
      result = amount + " kr.";
    }

    args.Result.FirstPart = result;
  }
}
&lt;/pre&gt;
&lt;p&gt;
First, and most importantly, the processor has to check the type of the field being
rendered. It’s only supposed to render &lt;em&gt;money&lt;/em&gt; fields and ignore everything
else. Then we retrieve the field value – notice the FieldValue property. The value
is parsed, and depending on the currency we nicely render the monetary amount of either
American dollars or Danish kroner. The result is stored in args.Result.FirstPart - &lt;em&gt;money&lt;/em&gt; field
is not supposed to be able to wrap other values, so nevermind the LastPart.
&lt;/p&gt;
&lt;h3&gt;Why Bother?
&lt;/h3&gt;
&lt;p&gt;
Implementing the above processor gives website developers the ability to use standard
Sitecore field rendering methods to properly render &lt;em&gt;money&lt;/em&gt; fields. Developers
can do &lt;em&gt;sc:field(‘money’, .)&lt;/em&gt; or use the &lt;em&gt;FieldRenderer&lt;/em&gt; class and never
have a second thought.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://alexeyrusakov.com/sitecoreblog/aggbug.ashx?id=21e62bae-7479-4099-89e3-109a97c11c62" /&gt;</description>
      <comments>http://alexeyrusakov.com/sitecoreblog/CommentView,guid,21e62bae-7479-4099-89e3-109a97c11c62.aspx</comments>
      <category>Sitecore</category>
      <category>Sitecore/Crestone</category>
    </item>
  </channel>
</rss>
