Banner
  • Simple Key-Value Sitefinity Configuration with NameValueCollection Property

    Jun 27, 2017
    Sitefinity allows you to easily create a custom configuration setting for storing and managing properties for your site. For the most part, you simply need to inherit from ConfigSection and add your properties. Once registered your settings will be automatically added to the backend Sitefinity Configuration page (Administration > Settings > Advanced). The documentation for this feature explains that there are several different types of properties supported, including simple types (like bool, string, etc.), as well as custom types that you can create by inheriting from ConfigElement and even collections for managing those custom types. However, one additional property type…
    Read More...
  • Enable Sitefinity Page Editing for Custom Roles

    Jun 27, 2017
    Page Editing: Just Assign the Right Roles. Right? I recently worked with a client that was setting up users in the Sitefinity backend under custom roles. Some users can edit one group of pages, while other users can edit other groups of pages. Setting up these groups of pages with the permissions so that group A can edit while B cannot, and vice-versa, is trivial. …But is that all we do in order to give users the page editing powers we wish to grant them? Nope! In attempting to complete this setup, the client was running into an issue: Despite…
    Read More...
  • QuerySelectorAll Error on BeginFormSitefinity

    Jun 27, 2017
    When developing a custom form on Sitefinity MVC widgets, the HTML helper method Sitefinity provides, Html.BeginFormSitefinity(), is a very handy resource. You wrap your form elements up inside the whole thing, along with a submit button, and you can point it at an HttpPost Action on your custom MVC widget controller with ease. When you’re putting your form widget on a master page, however, you can run into a rather vague JavaScript error that prevents your form from submitting correctly. The error in JavaScript brings up something about querySelectorAll and you’re left scratching your head as to what you did…
    Read More...
  • Enabling Email and Password Reset in Sitefinity

    Jun 20, 2017
    One of the common requests I get when working on various Sitefinity projects is to enable a feature in the Sitefinity backend that, by all appearances, is already on by default. I am talking, of course, about the ability for a site administrator to reset a Sitefinity user’s password from the backend, which reveals the password to the administrator (should they wish to notify the user personally) and also send an email to the user whose password was changed. While the UI is there out of the box and Sitefinity lets you attempt a password reset, in actuality nothing will…
    Read More...
  • Restoring Multilingual Translations in Sitefinity

    Jun 20, 2017
    Dude, Where’s my Translations? Occasionally I’ve run into an issue where enabling multilingual translations doesn’t correctly reach out to all aspects of my existing Sitefinity instance. Progress Sitefinity will allow translations to be made (under Interface Labels and Messages), and Pages and some content types will allow me to provide translations as well, but some dynamic content types will still behave as if there’s only one language available. Sledgehammer Approach My first thought would always be that maybe existing dynamic types have to be re-installed in order for translations to be made available to them. While you can uninstall a…
    Read More...
  • Multilingual Publishing in Sitefinity

    Jun 20, 2017
    Initially Publish your Content in a Non-Default Language Sitefinity has great multilingual publishing capabilities. From the perspective of an end-user / content manager, the backend offers up a myriad of methods to create content items both in the site’s default language as well as any other languages activated/enabled in the site itself. They’re all usually just one click away, and provide a good experience. But what about the development side of things? Say we have a custom widget that creates a content item, but the language either must be something apart from the default, or is user-selectable before creation occurs?…
    Read More...
  • Rewriting URLs to Lowercase in Sitefinity

    Jun 20, 2017
    Enforcing Lowercase on URLs to Normalize URLs In any web application, it is generally a good idea to make sure that all of your content has only one way to reach them via a user’s address bar in their browser. Whether you accomplish this by using canonical URLs, strict discipline/convention (i.e. “I will never capitalize any directory or filename”, very hard!), or rewriting URLs into lowercase ones, they all accomplish the same goal. Google only sees one URL for content, and your SEO doesn’t take a hit for “duplicate content” like what may happen if you can go to www.example.com/Foo…
    Read More...
  • Dynamic Content Detail Widget Templates in Sitefinity

    Jun 20, 2017
    Getting to Dynamic Content Data in Custom Code Behind In a previous post, I went over how you can easily create a custom code-behind C# class for any Widget Template in Sitefinity. Give that post a quick once-over, as this post builds upon that one. For built-in Sitefinity content items, accessing the data is pretty straightforward (see the previously-linked post): You grab the container, iterate over the items (even in the case of a single detail item), and then work with the data to make customizations to the page. For Dynamic Content Detail Widget templates, however, things work differently. You…
    Read More...
  • On Sitefinity Custom Widget Caching

    Jun 20, 2017
    Sitefinity is Caching too Hard! If you’ve done software development for any length of time, you’ve likely run into a caching issue. Caching is difficult to get right, but it is so beneficial that we work with it in nearly everything we do. In the case of Sitefinity, it performs caching all over the place. As a result, many aspects of the Sitefinity experience are greatly improved. If you disabled caching for a Sitefinity site altogether, the site would slow down immensely. Sitefinity, by its nature of being a Content Management System, stores the bulk of its content in the…
    Read More...
  • Disable Content Filters in Sitefinity

    Jun 20, 2017
    My HTML is Changing! Sitefinity gives you a lot of power. One of the many tools at your disposal is the ability to enter HTML in Content Blocks (either inline on a page, or in the Content Block type that can be shared among multiple pages). A common gotcha with new applications, however, is how Sitefinity filters these. Content filters exist out of the box in Sitefinity to presumably do two things: Standardize content entry (i.e. transform all tags to tags) ...
    Read More...

Tags:

Copyright © 2017 Alain "Lino" Tadros