A Shiny New Field Type: LinkList

It took long enough, but I finally finished a 1.0 version of the LinkList field type I was working on a while back. Unfortunately, somewhere along the way I lost the source code so I had to use ILSpy to get it back. ILSpy is a great tool for checking source code (I use it ALOT) but it doesn’t always generate pretty code as it is, in fact, IL code. Therefor, I will not publish the source code at this time (unless you really need it, then just email me or drop a comment here).

I wanted to handle links as content, not separate items, so I wanted to build a field type for it. Initially I wanted it to contain Sitecore.Data.Field.LinkField but was unable to find a way to populate it.

Without further ado; I give you Monoco LinkList Field Type as a Sitecore package.

Whats in the package?

  • The package contains the field definition item (installs under /sitecore/system/Field types/List Types in core db).
  • Files needed:
    • One tiny (well) DLL file in /bin
    • A config include (to inject the javascript file)
    • One javascript file for the content editor to respond to a few events needed.

Usage

Just create a new field on any template with the “Link List” field type and you’re set.

To access links, cast a field (LinkList field, that is) to Monoco.CMS.Fields.LinkList and go for the Links property, then bind it to a repeater or whatever you like.

What does it do?

It creates lists. Lists of links. Internal (Sitecore links), media (Sitecore media links, that is) and external

What does it look like?

I’ve included a screenshot;

Screenshot, ahem!

 

Disclaimer

Not claiming this is free from bugs but if you find any, feel free do drop me an email at code@monoco.se

Tagged with: , ,
Posted in Sitecore
One comment on “A Shiny New Field Type: LinkList
  1. skolima says:

    Not strictly on topic, but if you’re not happy with ILSpy decompiled code, then check out the results of JetBrains dotPeek (my preferred one currently) or Telerik JustDecompile. Or the trial version of Reflector. You’re much more likely to get feedback from others when you Sitecore module is on Shared Source.

    Yup, just repeating what was said on StackOverflow :P

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>