Sitecore CMS and everything related RSS 2.0
 Saturday, March 14, 2009

Another new field type in the FieldTypes shared source project: introducing Text List, a field for maintaining lists of predefined items with autocomplete and drag & drop reordering. Most people should be familiar with it by now.

Selected items and adding a new item, autocomplete:

textlist autocomplete

Drag & drop reordering:

textlist reorder

Text List field should be a good fit for maintaining a list of tags, email addresses and such:

textlist tags

While looking fairly different, it is a typical Sitecore list field, storing list of selected item IDs and requiring source to prefetch a list of items to select from.

More details on FieldTypes wiki.

It took a bit of work, and some features could be missing - please report any issues.

Saturday, March 14, 2009 9:49:32 PM (FLE Standard Time, UTC+02:00)  #    Comments [3]
Sitecore | Crestone | Open Source
 Saturday, March 07, 2009

I've just commited a new field to the FieldTypes shared source project: Limited Single-line Text.

Limited Single-line Text field

Limited Single-line Text field - over the limit

A modification of Single-line Text, that allows to limit its length and that displays the amount of remaining characters. Can be configured to disallow further input once the limit is reached.

See project wiki for usage and configuration instructions.

Inspired by SDN request and twitter input box.

Saturday, March 07, 2009 4:48:30 PM (FLE Standard Time, UTC+02:00)  #    Comments [3]
Sitecore | Open Source
 Thursday, February 19, 2009

Sitecore 6 Service Release One is officially out by the name of Sitecore 6.0.1 rev.090212.

A massive list of fixed issues, props to our documentation team for providing nicely formatted change log.

I've done my share of work on it, so I'm just as excited to see it being released. Yay!

This is not a recommended release yet, as we require builds to be used in production for some time to ensure stability first. So make sure to read this notice: It is appropriate for use if it contains fixes for issues that you encounter with the recommended release.

Thursday, February 19, 2009 3:34:20 PM (FLE Standard Time, UTC+02:00)  #    Comments [0]
Sitecore | Crestone
 Monday, January 19, 2009

Yan Sklyarenko started his Sitecore blog, which is great.

Yan is the leader of our modules team, overseeing everything concerning Sitecore module development. He's also been working on our installer, among other things, and is a generally nice guy, which is good for me, because my desk is next to his in Sitecore Ukraine office. Welcome!

Monday, January 19, 2009 12:44:01 PM (FLE Standard Time, UTC+02:00)  #    Comments [3]
Personal | Sitecore
 Wednesday, January 14, 2009

Sitecore has a number of ways to reference an item. Most common are ID and path, and most methods will accept either System.String or Sitecore.Data.ID parameter.

Item item = Context.Database.GetItem("/sitecore/content/somepath");
Item item = Context.Database.GetITem(ID.Parse("{11111111-1111-1111-1111111111111111"});

Our internal convention is that the ID can be used instead of path. You can supply the id as a string to methods that expect a path:

Item item = Context.Database.GetItem("{11111111-1111-1111-1111111111111111"}");

However you have to remember that neither path nor ID identify a piece of content in a unique way. Because Sitecore supports versions and multiple languages, a single item can have 3 versions in English and 2 in Danish. If you only use path or ID when retrieving items, you will get the latest version in the current (Sitecore.Context.Language) language.

Sometimes you need to be specific, so the GetItem() methods have overloads allowing to specify language and version:

Item item = Context.Database.GetItem("/some/path", Language.Parse("en"), Version.Parse(2));

Items can also come from different databases. Notice that I have been using the context database in the above examples, which depends on the current site and Sitecore configuration.

To identify an item, or rather a version, in a unique way, Sitecore has an ItemUri class. ItemUri is an ID or path, language, version and database name bundled together, as well as a number of convenience methods. This is how it looks like:

// get the item URI
ItemUri uri = Context.Item.Uri;

// string representation
string uriString = uri.ToString() -> "sitecore://master/{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}?lang=en&ver=1"

// parsing a string
uri = ItemUri.Parse(uriString);

// get an item by URI. Static Database.GetItem method can be used because URI includes database name.
Item item = Database.GetItem(uri);

There is a reason why paths or IDs remain most common ways to reference an item - usually it is a good thing that code adapts to current context and configuration. For some less typical Sitecore tasks, URIs can be handy.

Wednesday, January 14, 2009 1:07:50 PM (FLE Standard Time, UTC+02:00)  #    Comments [2]
Sitecore
 Thursday, December 18, 2008

Presentation Usage ReporterA new project by Alenka Caserman: Presentation Usage Reporter integrates in Content Editor and shows where your presenation components, such as renderings and sublayouts, are used.

Thursday, December 18, 2008 9:27:30 AM (FLE Standard Time, UTC+02:00)  #    Comments [0]
Sitecore | Open Source
 Tuesday, December 09, 2008

Changelog:

  1. Fixed: Installation wizard didn’t install files marked to skip if exists.

  2. Fixed: XSL renderings might fail occasionally under high server load.

  3. Fixed: Creator-Owner role might be ignored when resolving access rights.

Download.

Tuesday, December 09, 2008 6:13:12 PM (FLE Standard Time, UTC+02:00)  #    Comments [0]
Sitecore | Crestone
 Saturday, November 15, 2008

This post continues the series about the new field editing infrastructure introduced in Sitecore 6: I’ve talked about the renderField pipeline, and how you should be using renderField from .NET. Today is the example day.

Let’s start with links. You can put sc:Link control directly on the aspx page:

<sc:Link Field="Link" runat="server" />

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:

<sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server" />

To change the text of the link, you can use the Text property, but Link control is also able to render embedded content:

<sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server">
  Link text
</sc:Link>

And of course  it can render child controls:

<sc:Link Field="Link" DataSource="/sitecore/content/home" runat="server">
  <sc:Image MaxWidth="200" MaxHeight="200" Field="Image" runat="server" />
</sc:Link>

The same using C#:

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);

Notice that controls also have the Item property. The difference between Item and DataSource is that one is designed for API use and accepts Item class, and the other is designed for declarative use and accepts strings.

All of the examples above support Page Editor, including the image nested inside link.

Saturday, November 15, 2008 4:19:55 PM (FLE Standard Time, UTC+02:00)  #    Comments [0]
Sitecore | Crestone
 Monday, November 03, 2008

I’m starting on twitter at http://twitter.com/a_rusakov – 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.

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.

If you don’t want to use twitter but would still like to subscribe to (“follow”) my updates, you can use RSS.

Monday, November 03, 2008 12:39:04 PM (FLE Standard Time, UTC+02:00)  #    Comments [0]
Personal | Sitecore
 Sunday, November 02, 2008

Sitecore 6 Update 6 is released, and the only fix is the support for uploading files with Flash 10 installed.

Download.

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.

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.

Sunday, November 02, 2008 1:12:35 AM (FLE Standard Time, UTC+02:00)  #    Comments [2]
Sitecore | Web development
Archive
<March 2009>
SunMonTueWedThuFriSat
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234
Blogroll
 Alex de Groot
Few words about SiteCore from Holland
 Alexander Shyba
Sitecore Support
 Anders Dreyer
Anders Dreyer on Sitecore Development
 Jakob Christensen
Sitecore Core Development
 Lars Fløe Nielsen
Lars's ramblings about development and business processes
 Ole Thrane
Sitecore API
 Runi Thomsen
Runi Thomsen Sitecore Toughts
 The Sitecore Experience
The Sitecore Experience
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010
Alexey Rusakov
Sign In
Statistics
Total Posts: 211
This Year: 0
This Month: 0
This Week: 0
Comments: 0
Themes
Pick a theme:
All Content © 2010, Alexey Rusakov
DasBlog theme 'Business' created by Christoph De Baene (delarou)