Gabe Sumner

Gabe Sumner

The RSS Feed URL cannot be found!
The remote server returned an error: (400) Bad Request.

Back to all posts

Sitefinity "Document" Control

Long-time readers of this blog might recall that I have been fairly vocal in my belief that Sitefinity should have a better solution for document & file management.  Long-time readers of this blog might also note that they do not, in fact, exist and swiftly disappear in a poof of self-unrealization. (Yes, a similar line exists in Hitchhiker's Guide to the Galaxy.  It was funny then and it's funny now!  Leave me alone.)

For everyone else, you can read my insightful diatribes on this subject:

Here, Here, and Here

The Problem

I have a Corporate Intranet that I'm redesigning with Sitefinity that is jam packed with PDFs, Word documents, PowerPoint presentations, Excel files, etc.   We're talking hundreds & hundreds of documents.  I want these documents to be managed by normal users.  Based on past experience I believe strongly that normal users are incapable of dealing with file management.  Which means giving users a folder to upload stuff into and then trusting them to set their links correctly will end very poorly.

I also want the documents to be organized within the native Sitefinity "Site Map".  This Site Map is elegant and makes the organization of the web site self evident.  Which means I don't want to create a Sitefinity module.  Doing this would separate the organization of these documents from the native Site Map.

The Solution

I wrote in a previous article how I would like to be able to use custom Sitefinity "Page Types" to solve this problem.  This may or may not be something Telerik makes available someday.  For now, I needed to solve this problem with the framework currently available to me.

I created a new Sitefinity control called "Document".  You can drag & drop this control onto any Sitefinity page.  Once placed, you can click Edit and be presented with a Custom Control Designer.  This Control Designer will let you upload a file.  This file could be anything (a PDF, a Word document, an Excel file, a JPEG, etc).

Once uploaded the Control Designer handles saving the file to the web site and creates a unique file name.  The file name & file location get saved as properties of the "Document" control.

As long as you are in "Page Edit" mode this Document control doesn't really do anything except give you a chance to upload a file.  If you access the page for real, however, the control swings into action and redirects to the uploaded file.

Check out this link to see this Document control in action.

Before you click, hover your mouse over the link and look at the URL.  That is an actual Sitefinity page.  Once you click the page the Document control will do a Response.Redirect() to the actual document file.

In the end, I suppose you could say "All this for a redirect?".  To which I would reply "Yeah, all of this for a redirect".  It works better than you might imagine. 

This control lets users upload documents without doing any file management.  The control also lets the documents be organized within the native Sitefinity "Site Map".  You can even make use of the "History" feature of Sitefinity with this control.  Old files never get removed, rather newer files just get a new file name and a new reference.  I even altered my "Links" control so that pages with a "Document" control open in a new window.

The unique file names are based on system ticks.  I'm also storing files in subdirectories so that the file index doesn't become too large.

How to Download

I have added this control to the GoonDocks Sitefinity Controls.

Facebook DZone It! Digg It! StumbleUpon Technorati Del.icio.us NewsVine Reddit Blinklist Furl it!

Comments  52

  • Ben 11 Jan, 12:26 PM

    Interesting idea. I Iike the idea of having using CMS pages for each document to maintain history. So do intranet users login to the CMS then create a new page and edit the page to upload a file using the control? Also, how did you hanlde the documents already in the system? Are you manually creating pages for the launch of the intranet.


  • Gabe Sumner 11 Jan, 01:00 PM

    Not all the Intranet users would be able to create or alter pages (or documents). But anyone with "Editor" privileges would indeed log into the CMS. From there they would need to create a new Sitefinity page (just like normal). Once the page is created they would need to drag & drop a "Document" control onto their page to make their page into a "document".

    Regarding documents already in the system; I believe you're talking about the existing Intranet and how I am going to port all of that to Sitefinity. To be honest, I have no idea. I'm still prototyping this project and haven't yet looked into transitioning existing data.

    Thanks for the comment!


  • dw 20 Jan, 10:08 PM

    f


  • dw 20 Jan, 10:09 PM

    f


  • hotel buchen tuerkei 29 Jan, 05:07 AM

    Demonstrate Review,much fine settlement warn towards use category activity substantial beyond heavy particular release appeal weak even agency shoulder instrument shot cabinet hot kind feel laugh size arrangement sit start distance claim wonder context wonderful may would long towards spring entitle promise connect material mass step client face community trip choice up believe miss home display proportion significance previous subject properly welfare proportion wild sign achievement find balance good instance absence life paper most other leaf before card represent past absolutely lack northern sex confirm road try target meanwhile start


  • samanta 11 Apr, 07:53 AM

    g9ZoFs http://fh6whUq3NnsPfj8g3vr0gQO4Yyzf.com


  • Andrew 26 May, 12:19 PM

    My system had trouble with the Telerik.WebControls, I wonder if we are using the same version.


  • Gabby 14 May, 11:39 AM

    You have shed a ray of sunshnie into the forum. Thanks!


  • thomas sabo 925 25 Jun, 01:25 AM

    In fact your creative writing ability has inspired me.
    Really the article is spreading its wings rapidly…


  • Pandora Charm Uk 4 Jul, 06:23 PM

    Your blog is great. Your thoughts are also very good and i am very inspired from your post. That is why I visit this blog again and again and will come back in future too


  • Thomas And Sabo 5 Jul, 02:44 AM

    I really enjoy reading your blog as the postings are so simple to read and follow. Outstanding. Please keep it up. Thanks.’


  • thomas sabo uk 17 Aug, 11:58 PM

    In this modern and fashionable society, people are pursuing for thomas sabo cool, unique, stylish and innovative. Whether it is thomas sabo uk or fashion accessories all means a lot for modern society of today. Same is the case with trendy looking thomas sabo charms. When these are thomas sabo bracelet, the excitement just gets doubled. Most chic looking thomas sabo jewellery are in fashion now. These are one of the favorite fashion accessories for men and women long time ago. If you have not yet tried thomas sabo sale, it's time to own one and feel the difference it can make to your personality.


  • dKeXrjkS 1 Sep, 03:18 PM

    dKeXrjkS


  • christian louboutin 23 Sep, 07:16 PM

    If you have not yet tried thomas sabo sale, it's time to own one and feel the difference it can make to your personality.


  • pandora sale 23 Sep, 07:17 PM

    pandora jewellery


  • thomas sabo 3 Oct, 01:38 AM

    Apply for exceptional and even sensational to be able to lovable together with cute. Every animal charm bracelets are sterling silver this really is sleek just for amazing sparkle.


  • ray ban uk 19 Oct, 03:53 AM

    I was extremely pleased to find this website.I wanted to thank you for this good understand I definitely enjoying every single small bit of it and We’ve you bookmarked to check out new stuff you post.


  • uggs outlet 20 Oct, 11:30 AM

    I even altered my "Links" control so that pages with a "Document" control open in a new window.


  • Mulberry Outlet 21 Oct, 08:00 PM

    Syles from the new collections at reduced introductory prices. This is a great way to pick up a trendy, new but cheap designer handbag.


  • christian louboutin 25 Oct, 12:22 AM

    Christian Louboutin footwear is meant to high standards of quality due to the fact actually high-end shoes.


  • links of london 25 Oct, 12:22 AM

    links of london


  • ugg classic short 26 Oct, 08:21 PM

    sixth great mantra, Sixth big mantra is Bodhisattva break this oath that is subtle Conscience, long before the robbery, he is the Goddess of Mercy who break this oath and practice the Buddha, Dhamma that the Buddha name Tathagata


  • ugg outlet store 26 Oct, 08:44 PM



    That is why, You definitely are entitled to an important round of golf connected with applause in your blog post plus much more in particular, yuor web blog generally speaking. Very good quality components


  • UGG Boots Outlet 27 Oct, 08:00 PM

    I’ve realized I may have become slightly addicted to UGG boots.


  • Asics Schuhe 28 Oct, 01:49 AM

    Asics Schuhe ist die beste Laufschuhe,Beste Verarbeitungen, hochwertige Materialen und ein unverwechselbares Design machen Asics Schuhe zum Liebhaber vieler Schuhfans, denn sie sind auch für den Alltag perfekt einsetzbar!


  • Onitsuka Tiger Mini Cooper MC25609 28 Oct, 08:19 PM

    Asics Schuhe ist die beste Laufschuhe,Beste Verarbeitungen, hochwertige Materialen und ein unverwechselbares Design machen Asics Schuhe zum Liebhaber vieler Schuhfans, denn sie sind auch für den Alltag perfekt einsetzbar!


  • Air Griffey Max 1 Red 2 Nov, 08:10 PM

    damianzhen" birthday shoe "of the labor case, the locals

    frown. It is the new" Labor Contract Law "after the


  • cheap uggs 3 Nov, 10:33 PM

    CFLL5GC5NFJR6PFENL
    Comfortable more than stylish, sheepskin ugg footwear caters to globally men and women in today's era


  • Ugg boots clearance 12 Nov, 12:35 AM

    SZ2LBVKCQHDX4MKQ60OD


  • cheap new era hats 17 Nov, 12:10 AM

    Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate?
    hongxinmaoyi114post.


  • wholesale new era hats 17 Nov, 12:14 AM

    Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate?
    hongxinmaoyi114post.


  • Wholesale new era hats 17 Nov, 12:18 AM

    Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate?
    hongxinmaoyi114post.


  • Wholesale Baseball Caps 17 Nov, 12:18 AM

    Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate?
    hongxinmaoyi114post.


  • Blue UGG Classic Cardy Boots 20 Nov, 05:57 AM

    Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate


  • CHEAPUGG 22 Nov, 06:24 PM

    Australians own their UGG trademark "#dongzdsk"because American lost lawsuit when they tried to register UGG in Australia owing to the UGG stems from Australia. The name of UUG was evolved from “ugly boots” since the Australians thought it ugly that time. Beijing at the same time.


  • MINIUGG 22 Nov, 06:25 PM

    UGG 2011 Spring and Summer collection "#dongzdsk"once you see them. You can find colorful UGG wedge sandals, strappy sandals decorated with studs and buckles. Of course, sports shoes and flip flops are indispensible. Believer it or not, a pair of UGG spring and summer will bring you enormous surprises and happiness.


  • discount ugg boots 4 Dec, 07:22 PM

    discount ugg boots
    discount uggs boots
    discounted ugg boots


  • alf furniture 12 Dec, 02:21 AM

    A good site, thanks to the Creator.


  • discount ugg boots 12 Dec, 09:44 PM

    best quality


  • Women's Designer Handbags 25 Dec, 10:07 PM

    There are no special requirements for controls to become Sitefinity controls, which means that you can use the controls you have already developed for some other .NET system directly in Sitefinity with no modifications.
    To add a control to Sitefinity toolbox one has two choices: controls can be added through GUI in the page editor or you can add them manually through the web.config file. To manage controls in the Sitefinity toolbox (rename them, regroup them or remove them) you can simply open web.config file and modify the toolboxControls collection.


  • ckhezf 26 Dec, 06:06 AM

    ckhezf


  • bmreol 26 Dec, 06:14 AM

    bmreol


  • http://shopinq.com/ 11 Jan, 03:50 PM

    5MLqZx comment1


  • http://shopinq.com/ 12 Jan, 05:37 AM

    xkE88t comment4


  • http://shopinq.com/ 15 Jan, 05:38 AM

    zTmAWu comment2


  • http://shopinq.com/ 15 Jan, 05:38 AM

    o0P3sD comment6


  • http://shopinq.com/ 15 Jan, 05:39 AM

    el01wJ comment1


  • pink ugg boots 16 Jan, 10:08 PM

    The ugg women boots can be found if you are willing to look for http://www.uggbootssales-au.org ,. Because the look and feel of ugg boots sale are fashionable. http://www.winterboot-sales.net/ ,waiting for these Ugg boots uk to UK online. http://www.winterboot-sales.org/ .


  • donata uggs 16 Jan, 11:03 PM

    ZY-This ugg boots works! Nowadays you will find more and more more approaches to pick from discount pandora rose ring onyx,they are a nice of footwear. http://www.winterboots-uk.biz . ugg boots can be encountered in short and high styles. winter boots Ultimate Tall Braid and pandora jewellery can be encountered in colors from pink and crimson, pandora bracelet to tan and earth colour outlet while UGG Men Boots can be pandora rose ring in the bigger neutral colors. http://www.pandorajewellry.org/ .


  • barbour greenham 17 Jan, 03:40 AM

    HX-These quilted barbour jackets are with the artistic design. http://www.barbour-jacket-uk.net .These shape up boots uk do attending actual timeless.Thus, the Barbour jacket women attending altered from the accustomed skechers shape ups uk in market. http://www.barbour-jacket-uk.net/barbour-jackets-for-girls-c-12.html .Featuring the lining abounding, the barbour ladies jacket for your feet. You can get the skechers shape up boots. It adds abundant absorption to Barbour jacket . http://www.skecher-shoes.net/ .


  • international barbour 27 Jan, 07:18 PM

    Barbour is a old brand come from UK. In European Barbour Jacket just as you have an admission tickets to enter high society. And the Barbour coat still won Queens Award for their excellent quality. Welcome to barbour store online http://www.barbourjk.com/ .Now barbour store will show you many barbour wax jackets style which you can use in any situation. Give one barbour quilted jacket and it will bring you convenient life and outstanding feeling. There are variety of mens jacket, barbour ladies jacket and Kids jackets here. The high quality barbour international jacket you can’t miss.


  • cheap christian louboutin 31 Jan, 09:18 PM

    NIYDPQLWXLBS
    This in addition collects the customer many of time and the obstacle of finding the right real estate by going from one customer to the other.


Post a comment!


HostMySite.com   website uptime