• Consider Your Audience


    Nick Laidlaw headshot     

    As digital marketing professionals and application developers we spend a tremendous amount of time optimizing front-end experiences for visitors to the sites we design and build. This is certainly time well spent as we fully understand that a streamlined and relevant experience is rewarded with increased customer engagement and commerce sales. From this perspective our audience is the site visitor or customer. What about looking behind the curtain? Have we taken the time to consider the audience who's tasked to create engaging and personalized experiences using the tools we have developed?  
    read more

     
  • Sitecore, Out of the Box: Federated Experience Manager (FXM)


        

    Sitecore Federated Experience Manager (FXM) is an easy way to place Sitecore content on non-Sitecore websites.  While not a common need, this comes up when an organization prefers to use landing pages hosted in a Marketing Automation Platform or other non-Sitecore service.  Other uses include the desire to push Sitecore content onto a site that is not quite ready to be converted over to Sitecore.  This feature has been included in Sitecore since version 7.1.

    Using FXM you can not only use your Sitecore content, but the Sitecore personalization rules and even Sitecore analytics.

    read more

     
  • Upgrade to Sitecore 8.1 in Ten Steps


        

    As an early adopter of Sitecore, Agency Oasis has been using the CMS to build client website for almost a decade. Over that time we have had the opportunity to manage many upgrades. The upgrades from Sitecore 6 and 7 to Sitecore 8.1 are fairly straightforward with a few exceptions. Based on our experience, here are the ten steps to ensure a smooth upgrade, and to allow you to enjoy the new benefits and features in Sitecore 8.1. read more
     
  • AngularJS and Sitecore Integration


        

    So, the decision to use Angular in some capacity may already have been taken, or perhaps you’re just curious about different ways in which you might choose to integrate the two. The different choices pretty much vary along how tightly coupled the Angular front end would be with the Sitecore instance. read more
     
  • Sitecore Content CheckIn Module


    Mark Ursino headshot     

    The purpose of this blog post is to announce the release of a very simple (but useful!) Sitecore module called "Content CheckIn." Have you ever been in a sitation where someone has locked a content item and gone on vacation? Or they are not around to unlock it for you to work on it?

    Locked Item

    Well one solution is to log in as an admin and unlock these items. But best practice is to use admin accounts infrequently if ever. This module enables the ability for users within a configurable role to be able to unlock other peoples' content items.

    read more

     
  • Sitecore Publish Deletes Content


    Mark Ursino headshot     

    I was recently helping a colleague with a client authoring instance that was having issues. It was reported by our client that publishing content items within their site worked fine, but running a Site Publish from the tree caused the entire content of the site to disappear. I knew right away it likely had something to do with publishing restrictions. Let's dig in...

    read more

     
  • HTML5 Video with Sitecore


    Mark Graber headshot     

    In order to support HTML5 video with Sitecore using an mp4 video, you will need to make a few setting changes that you can apply with a Sitecore patch config file.

    read more

     
  • Tips for Launching Your New Sitecore Site


    Mark Ursino headshot     

    As we start to close out 2015, here at Oasis we are super busy with a number of Sitecore projects going live each week. As a platinum Sitecore partner we have our fair share of Sitecore projects throughout the year and right now we are finishing up a boatload of sites and launching them. Its customary at Oasis after a website is launched that a member of the project team bangs the gong in our company staff meeting. Well, since we've been banging the gong so much recently it reminded me of a number of things we do for each site on a regular basis as we get ready and launch new Sitecore sites. This blog post is intended to be a useful list of things to do when you prepare and launch your site. It's not exhaustive, it's not intended to be, and it never will be. It's simply a few tips and tricks to think of for your next launch. If you have anything you want to add, please add a comment and share!

    read more

     
  • $name in your Sitecore content


    Mark Graber headshot     

    When using the $name token in standard values, especially when there is template inheritance, I've seen the $name token start rendering in the page.  If this starts happening and your page content binding leverages Sitecore search, then rebuilding the search index should resolve it.

    If you have a multiple server environment between CM and CD servers, you need to make sure the indexes are rebuilt on all relevant servers.

    read more

     
  • Fine Points - Optimized for Marketing Teams


    Nick Laidlaw headshot     

    Sometimes Solution Architects spend so much time on the seemingly difficult aspects of a Sitecore application build and forget about one of the main personas; Marketing team members. In many organizations the marketing team is fully responsible for content updates, personalization rules and A/B testing. This is the first of several posts that are geared toward making the editorial experience in Sitecore as smooth as possible for marketers. You will find that several of these steps are quick but can make a world of difference for the people who will work within Sitecore on a regular basis.

    read more

     
  • Tokens in Standard Values


    Mark Graber headshot     

    The following tokens can be used in the fields on the standard values items. They will be replaced with other values, when the item is created.

    read more

     
  • Sitecore ContentSearch Configuration Tips


    Nick Laidlaw headshot     

    Sitecore 8 offers a ton of flexibility when it comes to creating, tuning and updating Lucene search indexes.  Developers can use default indexes right away, but you will likely want to define custom indexes to meet specific requirements.  When you go the custom index route you will be introduced to a slew of configuration options.

    read more

     
  • Issues with Unapproved Sitecore Content Being Published


    Mark Ursino headshot     

    I was recently helping a client with an immediate issue where content had been published live when it was not supposed to. "What happened with workflow? How did this get through?" They have a scheduled publisher in place to publish on a schedule and that picked up the item and published it so we immediately knew to look at the workflow settings of the item.

    read more

     
  • Controlling HTML Encoded Fields


    Mark Graber headshot     

    Occasionally, there is a desire to include HTML in a Single-Line Text field.  For example, if you want to superscript a trademark symbol into a title field: <sup>TM</sup>.  You don't want Sitecore to automatically HTML encode the superscript tag.

    read more

     
  • Sitecore Solr Configuration in a Multi-Server Environment


    Mark Ursino headshot     

    Sitecore 7 ships with a new Content Search API for developers to search massive amounts of content across a single Sitecore application instance. Out-of-the-box you get implementations of Lucene.NET and Solr for an underlying search provider. If you have more experience with Lucene or are new to Solr, its important to understand the differences between the two. Solr is well known for more robust search features as it is exposed via a RESTful API from a central dedicated search server. It's typic... read more
     
  • PageEditor Issue with Surrounding Header Tags


    Mark Graber headshot     

    If your markup looks like <h1><sc:FieldRenderer FieldName="Heading" runat="server" /></h1> PageEditor will add the h1 tag to the editable content and your field content will get all messed up.

    read more

     
  • Sitecore 7 Compatible SwitchMasterToWeb.config


    Mark Ursino headshot     

    The current version of the SwitchMasterToWeb.config file provided by Sitecore on the SDN is defined for Sitecore 6. With the introduction of native Lucene search indexes in Sitecore 7, its important to remove references to the master database index.

    read more

     
  • Is Valid Item Name


    Mark Graber headshot     

    string itemName = ItemUtil.ProposeValidItemName(name); read more
     
  • Sitecore Quick Tip: Detach and Attach Media


    Mark Ursino headshot     

    Here's a quick tip for your day to help you while managing media assets in Sitecore's Media Library. Have you ever needed to swap out an image already used on your website in various places?

    read more

     
  • Globally Catch Sublayout Exceptions


    Mark Ursino headshot     

    Most Sitecore developers that use the Web Forms rendering stack tend to leverage sublayouts as their primary construct for UI components. If you find yourself doing this, you should consider a global way to handle catching errors so your site doesn't show any 500 errors.

    read more

     
  • Sample Workflow Warning About deep=1 Publishing


    Mark Graber headshot     

    I received workflow publishing questions a few times recently so thought it warrants a blog post.  Many people use the Sample Workflow as a starting point to build out their own custom workflows.  This is a great way to get started, but make sure you know what the deep=1 setting means.


    read more

     
  • Sitecore Geo IP Testing


    Mark Ursino headshot     

    Sitecore DMS provides a great feature set that allows marketers to promote, optimize, test, and track content performance on their Sitecore-managed websites. One of the key features is the ability to target content to visitors based on physical location using Geo IP lookup tools. This is great for real-world use cases of site visitors, but quite difficult to test as developers. Agency Oasis is proud to announce the release of the Geo IP Tester module to ease this pain for developers.

    read more

     
  • One way to troubleshoot performance issues with a Sitecore page


    Doug Couto     

    Ever had performance issues with a Sitecore page?  Here's one way you can troubleshoot the issue and get to the bottom of it.

    read more

     
  • Tips on Setting up a Content Delivery Server with No Master Database


    Mark Graber headshot     

    The following are my recommended steps for setting up a content delivery server in Sitecore 6.6.

    First, download the Sitecore Scaling Guide and the SwitchMasterToWeb.config from this SDN Link.

    Once you have followed the steps in the scaling guide, you will get the following error:

    ERROR Failed to perform Visit End actions 
    Exception: System.InvalidOperationException 
    Message: Could not find configuration node: databases/database[@id='master'] 
    Source: Sitecore.Kernel 
       at Sitecore.Diagnostics.Assert.IsTrue(Boolean condition, String message) 
       at Sitecore.Configuration.Factory.GetConfigNode(String xpath, Boolean assert) 
       at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) 
       at Sitecore.Configuration.Factory.GetDatabase(String name) 
       at Sitecore.Analytics.Pipelines.VisitEnd.RunRules.Process(VisitEndArgs endArgs) 
       at (Object , Object[] ) 
       at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) 
       at Sitecore.Analytics.VisitEndWorker.Helper.Process(Action visitEndAction)

    To fix this, you'll need to create a new file named Sitecore.Analytics.DefaultDefinitionDatabase.config with the following added to it:

    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
        <sitecore>
            <settings>
                <setting name="Analytics.DefaultDefinitionDatabase">
                    <patch:attribute name="value">web</patch:attribute>
                </setting>
            </settings>
      </sitecore>
    </configuration>

    Note: this setting is currently not located in any file, it's hard-coded into the Analytics DLL and the default value for this setting is "master", therefore, you MUST create a new config file to override this setting.

    If you still get the error, there may be more references to master in the config files that were added after the standard install.  Two examples are the News Mover module and Advanced Database Crawler.  The solution is to find all references to these master databases and patch them to replace with web or remove the setting entirely if it is not needed in the context of a delivery server.

    read more

     
  • Sitecore Query By DateModified


    Mark Graber headshot     

    Use the following code to query your Sitecore content for updates to content items between a date range.

    Open the Developer Center and select the XPath Builder.

    Here is the code:

    //*[@__Updated >= '20130626T120000' and @__Updated < '20130627T000000']

    Also, check out John West's Blog for more about Sitecore Query Syntax.

    read more

     
  • Unable to find resource 'CustomItem.base.vm'


    Doug Couto     

    Make sure you are installing the correct version of the CustomItemGenerator module for the version of ASP.NET your Sitecore site is running in.

    read more

     
  • compareRevisions - very important!


    Doug Couto     

    Make sure you understand all of the parameters you can set when performing a publish action programmatically.

    read more

     
  • No Results From Lucene Search Index


    Mark Graber headshot     

    I encountered a new Lucene search problem today.  The code was not returning any search results from the index, but all of the expected settings pointing to the correct database, file path, history engine, scaleability settings, etc. were all configured properly.  However, because this was a distributed server solution with multiple publishing targets, there were new database names in the connection string beyond the standard core, master, web.  In addition, the new database names included an underscore character in their name.  Special characters like this can often cause unexpected issues.  Therefore, we renamed all instances of the name with an underscore to remove that character, and this was the solution which leads me to calling out a Sitecore Best Practice and Common Issues.

    read more

     
  • Selecting a Rich Text Editor


    Mark Graber headshot     

    Instead of setting the Source to "/sitecore/system/Settings/Html Editor Profiles/Rich Text Full" in all of your Sitecore Data Templates, you should consider updating the following setting so that it applies to all of your Rich Text fields.

    <setting name="HtmlEditor.DefaultProfile" value="/sitecore/system/Settings/Html Editor Profiles/Rich Text Full" />
    
    read more

     
  • Message: Access to the registry key 'Global' is denied.


    Mark Graber headshot     

    If you are seeing the following filling up your Sitecore log files, please following these steps to resolve the permission issue.

    Exception: System.UnauthorizedAccessException
    Message: Access to the registry key 'Global' is denied.
    Source: mscorlib
       at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
       at Microsoft.Win32.RegistryKey.InternalGetValue(String name, Object defaultValue, Boolean doNotExpand, Boolean checkSecurity)
       at Microsoft.Win32.RegistryKey.GetValue(String name)
       at System.Diagnostics.PerformanceMonitor.GetData(String item)
       at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item)
       at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
       at System.Diagnostics.PerformanceCounterLib.CategoryExists(String machine, String category)
       at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName, String machineName)
       at System.Diagnostics.PerformanceCounterCategory.Exists(String categoryName)
       at Sitecore.Diagnostics.PerformanceCounters.PerformanceCounter.CanBeCreated()
       at Sitecore.Diagnostics.PerformanceCounters.PerformanceCounter.InitializeCounter(Boolean reset)
    
    read more

     
  • Styling Sitecore Fields in Content Editor


    Mark Graber headshot     

    The Sitecore Content Editor support customization of the display for fields.  The most common example that I have used is increasing the height of a Multi-Line Text field.

    read more

     
  • Sitecore Dictionary Usage in Separate CM and CD Environments


    Mark Ursino headshot     

    Since Sitecore is a sophisticated and enterprise-level CMS that supports multi-language sites, it's important to consider proper technical design and development decisions when creating multi-lingual sites. It's very common for developers to not hard-code text labels and common text and instead leverage the Sitecore Dictionary to provide textual content via the CMS itself. This is a great hidden gem feature of Sitecore, however it breaks down when you have a separate environment for content management (CM) and content delivery (CD) for sites using 6.5 and older. This is an issue that can easily be addressed by creating a custom dictionary translator.

    read more

     
  • Configure Sitecore Search Index Support across Master and Web Databases


    Mark Ursino headshot     

    Data access and item retrieval techniques are common topics of discussion and debate within the Sitecore development community, particularly with the continued advancement of tools to leverage fast data retrieval with search indexes. In fact, John West recently published a blog post about ways to get items from the Sitecore CMS. One of his approaches which is common among developers is to use search indexes. Leveraging the out-of-the-box Lucene.NET search can enable sites to use the full text search features and also allow for some custom faceted searching and filtering as well. Tools already available such as the Advanced Database Crawler and the newly released Item Buckets allow developers to easily work with Lucene.NET search indexes. One common consideration when developing code for a project is to consider how content editors will use the system, particularly with editing and previewing non-live content (in the master database). This blog post will describe some ways to make search indexes work across both the master database and a published database (e.g. web).

    read more

     
  • Coveo No Index Tag


    Mark Graber headshot     

    The <noindex> tag is a very useful tag to wrap HTML content that you want to hide from the Coveo search crawler.

    read more

     
  • Sitecore Content Start Path


    Mark Graber headshot     

    The Sitecore API provides a property to get the Sitecore content start path so you should never hard-code this on your website.  Use the API and it will also work for multiple sites.  However, there is more than one way exposed from the API.  Make sure you use the Sitecore.Context.Site.StartPath because the Sitecore.Context.Site.ContentStartItem comes through as an empty string as I discovered in my Sitecore 6.5 install.  Sitecore.Context.Site.ContentStartPath returns all the path except for the home node.  If you use Sitecore.Context.Site.StartPath you get the whole thing: path and home node.

    read more

     
  • Publishing an Item Rename


    Mark Graber headshot     

    Have you ever had issues renaming an item and having that item show up renamed on the website?  I've noticed in version 6.5 of Sitecore that if you are running a Smart Publish, it won't recognize that the item has changed on a rename.  You need to run a Republish of the renamed item to ensure that it gets published.

    read more

     
  • Trim List of Strings


    Mark Graber headshot     

    Here is a code snipet if you want to trim a list of string using LINQ

    myStringList.Split(delims).Select(str => str.Trim())
    read more

     
  • "Professional Sitecore Development" Book Tour Meetup Re-Cap


    Mark Ursino headshot     

    Last night the local Sitecore User Group in Boston hosted a "Professional Sitecore Development" book signing. The event took place in the Westin Copley Place in Boston, MA. John West used the time to speak about his position at Sitecore and the process of writing his book.

    read more

     
  • Sitecore Partners Around the World


    Nick Laidlaw headshot     

    It’s not often that one gets a chance to meet face to face with a professional peer on the other side of the globe. Last week while on vacation, I had the unique opportunity to do just that! I switched out my shorts and sandals for kakis and shoes and hailed a taxi to see Linakis & Associates (a Sitecore certified partner located in Athens, Greece). I met with three of the founders/management team over coffee and had lively conversations about agencies in Europe, Sitecore (of course) and the development community.

    read more

     
  • Mark Ursino Sitecore MVP


    Mark Graber headshot     

    Congratulations to Mark Ursino for being awarded the Sitecore MVP award. Every year, Sitecore MVPs are chosen through an extensive evaluation process put forth by an independent panel of Sitecore employees from technical, product marketing, and executive positions. This panel reviews all nominations factoring in quality, quantity, and the level of impact of the nominees’ involvement.

    read more

     
  • Using Sitecore to Increase Speed to Market


    Nick Laidlaw headshot     

    In May Sitecore developers were able to get their hands on the first authorized publication on Sitecore Development. The book, "Professional Sitecore Development" by John West, is an all-encompassing write-up on Sitecore’s API, authoring tools, security infrastructure and more. Until the book was released developers were limited to blog posts and Sitecore Cookbooks for coding practices and architecture methodologies.

    read more

     
  • Sample Code


    Mark Graber headshot     

    Today, I just wanted to share a few lines of code that have been useful in many situations. This introduces a few of the built-in Sitecore utility methods.

    Here is the sample code:

    if (Sitecore.Data.ID.IsID(itemId)) {
    	Item item = Sitecore.Context.Database.GetItem(Sitecore.Data.ID.Parse(itemId));
    	strPageTitle = Sitecore.StringUtil.RemoveLineFeeds(item.Fields["Page Title"].Value);
    }

    Let's break it down:

    • Sitecore.Data.ID.IsID()
      This method takes in a string guid and returns true if it's a valid guid in Sitecore
    • Sitecore.Data.ID.Parse()
      This method takes in a string guid and returns a Sitecore ID object
    • Sitecore.Context.Database.GetItem()
      This method takes in a Sitecore ID object and returns a Sitecore Item object
    • Sitecore.StringUtil.RemoveLineFeeds()
      This method takes in a string and returns the same string with line breaks removed.  This is helpful if you are populating an HTML tag attribute or a line of JavaScript where line breaks would be invalid.

    read more

     
  • Lucene Field Type Configuration


    Mark Graber headshot     

    This topic is related to using Lucene with the Sitecore shared source module Advanced Database Crawler from Alex Shyba, http://sitecoreblog.alexshyba.com/2010/11/sitecore-searcher-and-advanced-database.html.  My searches were not returning the expected results consistently when using the FieldValueSearchParam.  The search worked on some fields, but not others.  The FieldValueSearchParam allows you pass in a collection of fieldName, fieldValue pairs to search for values in specific fields.  This is a very powerful tool because it executes much faster than Sitecore queries.  After a number of test cases, I noticed that the fields there were not working were of field type, Droplist and AccountSelector.  Droplist is a built-in Sitecore field type that allows you to see a dropdown of values to select from, but it stores the raw value as plain text rather than a Guid like the Droplink field type.  The AccountSelector is a Sitecore shared source module that lets you select a user or multiple users from the Sitecore security database.  It stores the logins as plain text '|' delimited for multiple logins.  Since both were essentially single-line text values, the configuration you need to add is the same as the single-line text field type.  Add the following to your search config file and rebuilt the index.

    <fieldTypes hint="raw:AddFieldTypes">
           …
           <fieldType name="droplist" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
           <fieldType name="accountselector" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
           …
    </fieldTypes>

    Without these settings you can search for the items with the Full Text query, but not the Field search because the text from the Droplist and AccountSelector fields are added to the full text but not stored as the field level without this config change.

    read more

     
  • Sitecore API Docs


    Mark Graber headshot     

    Here are two links to Sitecore API docs.  I'm not sure what the version number represents, but I'm developing on Sitecore 6.0 through 6.5 and haven't found a class or method that is not listed.

    http://sdn.sitecore.net/doc/api%205.0/Sitecore.html

    http://sdn.sitecore.net/doc/api%205.1.1/Sitecore.html

    read more

     
  • Sitecore Utilities


    Mark Graber headshot     

    Here are some helpful methods in some of Sitecore's built-in utility classes.  There are many helpful utilities burried in the Sitecore API, but these are a few to explore.

    Browser Detection

    Sitecore.UIUtil.IsFirefox()
    Sitecore.UIUtil.IsIE(6)

    String Utility

    Sitecore.StringUtil.ExtractParameter()
    Sitecore.StringUtil.ArrayToString()

    File Utility

    Sitecore.IO.FileUtil.ZipFiles()

    Getting Guid from Sitecore

    Sitecore.ItemIDs.RootID
    Sitecore.ItemIDs.AnonymousUser
    Sitecore.ItemIDs.EveryoneRoleID

    read more

     
  • Subversion to FTP Site Release Process


    Mark Graber headshot     

    Subversion is our preferred tool for managing our source code revisions and merging code between development teams.  This article describes a way to leverage your Subversion revisions to release files to a hosting environment that may not allow you to run an update via SVN, but instead your only access point is through FTP site.

    read more

     
  • Managing CSS Files in Sitecore


    Mark Graber headshot     

    Sitecore is a content management system, but can it also be a web design management system?  The short answer is that you can design some solutions to provide flexibility for content management users to manipulate the the design via CSS files, allow them to manage and upload their own CSS files or make changes to the initial CSS files.

    Read more for the configuration steps required to support CSS files as Sitecore Media Assets.

    read more

     
  • Changes to FieldRenderer When Upgrading from Sitecore 6.2 to 6.3


    Mark Graber headshot     

    In addition to the following references to review and consider when upgrading from Sitecore 6.2 to 6.3, you should be aware of a small change to the FieldRenderer control.  Sitecore 6.3 removes new-line (\n) characters from Multi-Line Text fields so if your code is setup to use those new-line characters and replace them with <br /> tags or split on them to build an array of lines, you should get the raw value from the Value property on the Field collection instead of getting it from a FieldRenderer because the Value property will still include the new-line character.

    Sitecore 6.3 Release Notes

    http://sdn.sitecore.net/SDN5/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/ChangeLog/Release%20History%20SC63.aspx#631initial

    Introducing Sitecore 6.3 PDF Reference

    http://sdn.sitecore.net/Reference/Sitecore%206/Introducing%20SC63.aspx

    read more

     
  • Helpful Admin Pages to Secure in Production Environments


    Mark Graber headshot     

    The following URLs are very helpful admin pages, and they are not secured with password protection by default.  You should secure these in production environments.  I recommend securing your whole sitecore folder with IP restrictions in IIS because this is very quick and easy to setup.

    1. /sitecore/admin/cache.aspx - lets you monitor the caches, sizes, and clear cache
    2. /sitecore/admin/stats.aspx - lets you see the Sublayout Html caches to confirm if you Sublayout caching is working as expected
    3. /sitecore/admin/showconfig.aspx - lets you see the working Sitecore config settings in case your not sure if there is a patch config in your App_Config/Include folder is overriding something in the Web.config file
    read more

     
  • Subversion Tip - Simple Rollback to Previous Version


    Mark Graber headshot     

    Although this is not specifically a Sitecore topic, it is something that comes up often for us on our Sitecore projects because we almost always use Subversion to manage our code and configuration files. In the case where you've made an update that you want to revert back and have it become the latest revision again, take the following steps:

    1. First, make sure the file you want to rollback is identical to the latest version checked in, and you can do this by running an Update on the file. Then, right-click the file and select Diff. It should return the identical message. If not, you can deleted the file and get the latest.
    2. Now that you have the latest version of the file, right-click on the file you want to rollback and select TortoiseSVN>Show Log
    3. Right-click on the file in the bottom half of the window where it shows Action, Path, Copy from path, and Revision. Select "Revert changes from this revision"
    4. It will prompt you with a message about reverse-merging the revision into your working copy. Click Yes to the prompt.
    5. To confirm it matches the previous version, right-click on the file and select Diff with previous version. You should get a prompt that the files are identical.
    read more

     
  • Using Akamai Net Storage for Sitecore Media Items


    Mark Graber headshot     

    This article provides some ideas on how to leverage an externally hosted Media Library, such as, Akamai NetStorage.

    read more

     
  • Include Config Files


    Mark Graber headshot     

    As Sitecore continues to move components out of the 2000+ line Web.config file, don't forget to sift through the config files in the App_Config/Include folder.  An example of this came up for me today with the Sitecore Ecommerce Module where a config file in the Include folder was overriding the Web.config setting.

    Some of the important things to remember about these config files is that they can override settings that are in the Web.config file.  Here is the simple example from the Ecommerce Module.

    read more

     
  • Sitecore Announces Better Shared Source Support


    Mark Graber headshot     

    Here is a trackback to Jimmie Overby and the Sitecore Shared Source Blog.  The Shared Source Blog is a great way to read about new things happening with the shared source modules.  The shared source modules are great, and now even better with "Tested by Sitecore" assurance.  Here is a link to the full post:

    http://sharesitecore.wordpress.com/2011/01/14/announcing-the-better-shared-source-initiative/

    read more

     
  • Linking to Content Editor


    Mark Graber headshot     

    Here is an easy way to link to the Sitecore Content Editor for your Custom Applications within the Sitecore Desktop. I also recommend that you set the target of the link to _blank or a named target so that it opens in another window.

    protected string GetInternalItemLink(string guid, string lang) {
        return string.Format("/sitecore/shell/sitecore/content/Applications/Content Editor.aspx?id={0}&la={1}&fo={0}", guid, lang);
    }
    
    read more

     
  • Version Control with Sitecore and Subversion


    Mark Graber headshot     

    This post will be very brief because I mainly wanted to share a link to a Sitecore Developer Network Article that walks through how you should use Subversion for your Sitecore projects.  We use the same process at Oasis with Subversion.  Pay close attention to the ALL CAPS note: "DO NOT ADD PARTS OF SITECORE DISTRIBUTION TO SVN UNLESS YOU WANT TO MAKE AND TRACK MODIFICATIONS TO THEM."

    We make sure that we do not commit files that are part of the Sitecore installation, unless we make changes to them.  This way you can download any version of Sitecore that you want, checkout your SVN files, copy them on top of the Sitecore installed files, and now you have a new version of your code running on that version of Sitecore.  Clearly, there are a few more steps, such as, configuration file considerations, but you get the general idea.  If you keep your committed code separate from the Sitecore installation, it will be easier to manage your Sitecore version updates, and you won't fill your Subversion repositiory with unnecessary files.  In addition, you will kill the performance of your repository if you fill it with the Sitecore folder under the website.

    Here is the link to the article.  http://sdn.sitecore.net/Developer/Team%20Development%20with%20Sitecore/Tuning%20Environmfent%20for%20Team%20Development/Developer%27s%20Workstation%20Installation/Creating%20a%20New%20Progect%20in%20SVN.aspx

    read more

     
  • Sitecore Caching with Sublayouts


    Mark Graber headshot     

    This post will walk through some of the great caching features that Sitecore provides using sublayouts.  I will walk through 3 simple examples to get you starting with using sublayouts to cache content.  Once you get the basics, there are many more ways to use caching to meet the needs of your web applications.  Here are the 3 examples:

    1. Static Content – Same for All Users
    2. Dynamic Content – Vary by Logged-In State
    3. Dynamic Content – Vary by SessionID & AccountID

    The following examples use hard-coded sublayout tags you can drop into your Layout code, but the same concepts apply when using the dynamic Presentation layer in Sitecore.

    read more

     
  • FTP Client from Sitecore Codebehind


    Mark Graber headshot     

    Have you ever wanted to download files from an FTP server with ASP.NET code?  If so, you probably considered a few different paths: (1) buy some code or a DLL for the FTP Client, (2) build your own class library, or (3) search from something built-in to ASP.NET.

    This article is going to discuss the third option.  There are some built-in classes that you can use in ASP.NET 3.5 even though the articles are titled .NET v4.0.  I can confirm that this code works on a Sitecore 6.2 website that is running ASP.NET 3.5 and not 4.0.

    Download FTP Client Samples Here:

    http://code.msdn.microsoft.com/nclsamples/Release/ProjectReleases.aspx?ReleaseId=3503

    http://msdn.microsoft.com/en-us/library/b7810t5c%28v=VS.90%29.aspx

    Click into the article detail to view the key source code.

    read more

     
  • Sitecore Configuration API


    Mark Graber headshot     

    Here is a very helpful class that is not so often discussed... the Sitecore.Configuration class, and it is super easy to use.

    Below is a simple code example of how this class can be helpful. We all know that Sitecore's Web.config file is loaded with more settings and configuration attributes then any of us can explain. Therefore, it could be common that you would want to know some of these settings in your C# code.

    For example, you could have a page that you only want Sitecore Admin users to view and redirect them to the specific type of error page if they are not logged in as an Admin (i.e. permission denied or No Access URL). Here is how you would code that:

    if (!Sitecore.Context.User.IsAdministrator) {
        Response.Redirect(Sitecore.Configuration.Settings.NoAccessUrl);
    }
    
    read more

     
  • Click Event Handlers Hackery


    Mark Graber headshot     

    Another interesting need came about today working with the Sitecore Ecommerce Module because most of the module is compiled into a DLL. There came about a need to update a value when the click event was fired, but the click event was in the DLL. Therefore, to avoid rewriting the event by copying code from the Reflector tool, I removed the event in the Page_Init that I added to the ASPX file. This allowed me to add my own event btnUpdate_Click2 to the ASPX file.

    So, the question is, are these events synchronous or asynchronous? All testing so far has indicated that the events are asynchronous, meaning that they run in order and not at the same time. The code below shows how this was done.

    btnUpdate.Click -= btnUpdate_Click;
    btnUpdate.Click += new EventHandler(btnUpdate_Click2);
    btnUpdate.Click += btnUpdate_Click;
    


    More on ASP.NET Events 

    read more

     
  • Selecting CSS Class Names with Dots Using jQuery


    Mark Graber headshot     

    Another day... another unique issue.  The title of the post pretty much summarizes the new issue.  Working with someone else's code, you don't have control over naming conventions of CSS classes, and I just happened to be using code that has dots in the CSS class names.  I know what you are thinking.  Isn't that illegal?  Well, apparenltly, you can do it, but I wouldn't.  So, I will say this is how to work with it if you are using someone else's code because you would never code dots in your CSS class names.

    So, here is the jQuery code to select CSS class names with dots.  You need to escape the dot with two backslashes.  I won't reveal the source of the "unconventional" CSS code, but you may be able to tell from this example.

    // Hide fields on Checkout Name and Address form
    $(".name\\.Country").hide();
    $(".name\\.ShippingCountry").hide();
    
    read more

     
  • How to Build an XSLT Extension


    Mark Graber headshot     

    I know that most of us developers hate using XSLT, but what if someone else wrote the XSLT for you and you just wanted to make a few tweaks to it. Then, you might like the XSLT because it's already done. Therefore, you need to understand how it works and how you can write C# code to make some simple changes. Here is a code example from the Sitecore Ecommerce Module, where I wanted to override the GetSinglePrice method in an XSLT rendering.

    Step 1 : This first thing you need to do is write your own class like the following that inherits from the Sitecore.Xml.Xsl.XslHelper class.

    class XslExtensions : Sitecore.Xml.Xsl.XslHelper
        {
            public string GetSinglePrice(XPathNodeIterator ni) {
                IProduct product = 
                   Sitecore.Ecommerce.Context.Entity.Resolve<IProduct>();
                IPriceParameters priceParams =
                   Sitecore.Ecommerce.Context.Entity.Resolve<IPriceParameters>();
    
                return String.Format("{0:C}", product.GetSinglePrice(priceParams));
            }
        }
    
    
    read more

     
  • Sitecore Shared Source Modules


    Mark Graber headshot     

    If you aren’t familiar with the Sitecore Shared Source Modules, you are missing out on some great tools.  This past week, we made use of another great module, the Account Selector Field module (http://trac.sitecore.net/AccountSelectorField).

    Click through to read the full post.

    read more

     
  • Sitecore.DateUtil - The Useful Sitecore Utility You Never Heard Of


    Mark Graber headshot     

    If you want to convert an ASP.NET DateTime object to a Sitecore ISO Date String, you should use this method Sitecore.DateUtil.ToIsoDate or Sitecore.DateUtil.ToIsoTime

    No need to re-invent the wheel here.  So, delete your internal methods from your libraries because I assume you have already done this on your own, not knowing that this already existed for you.

    By the way, there are some other methods in the DateUtil class also, so check them out too.

    read more

     
  • Sitecore XPath Query Gotcha


    Mark Graber headshot     

    Here is one of the classic gotcha's the we often come across. The dreaded "-" dashes in node names.

    query:/sitecore/content/#My-Site#/Home/*[@@templatename='mytemplate']

    You have to keep in mind that item names with "-" dashes should be enclosed with "#" hash symbols. Otherwise, it will not work for you.

    Good luck!

    read more

     
  • Linking To An Item in the Content Editor


    Mark Graber headshot     

    This is a cool trick if you are building custom Apps or Tabs in the Sitecore Desktop. If you want to link to an item, you just need the Guid of the item to link to and follow the following URL structure. If you want it to open in a new browser window, you can set the target="_blank" and that will work too.

    /sitecore/shell/sitecore/content/Applications/Content%20Editor.aspx?id={Guid}&la=en&fo={Guid}
    
    read more

     
  • .NET Events


    Mark Graber headshot     

    I know this is a Sitecore Blog, but I feel the need to share a .NET tip this week that can be used in all of your Sitecore projects as well.  In the past, I used to add .NET events handlers on the ASPX code like the following.

    < asp : Repeater runat ="server" ID ="Repeater1" OnItemDataBound ="Repeater1_ItemDataBound">

    read more

     
  • Building a Sitecore Website Zip


    Mark Graber headshot     

    The following steps will help you reduce the temp files that are not needed in your zip file.

    1. Delete Website\sitecore\shell\Applications\debug
    2. Delete Website\sitecore\shell\Controls\debug
    3. Delete everything from Data folder except license file, folders, and packages
    4. Delete Website\App_Data\MediaCache – delete the whole MediaCache folder
    5. Delete Website\temp\* - keep the folder and delete all items
    6. Delete all items in Website\indexes\* - keep the folder
    7. Edit the ConnectionStrings.config file and delete the logins
    8. Be prepared to update the dataFolder in the Web.config file
    read more

     
  • Tracking Downloaded Files with OMS


    Mark Graber headshot     

     

    Before you get started with the OMS, you should check out Nick Laidlaw's Post about how to setup the analytics database.

    read more

     
  • How to Use Parameters


    Mark Graber headshot     

    Parameters are useful when you want to reuse the functionality of a Sitecore control, like a Rendering, and vary the way it functions by controlling this behavior in Sitecore rather than in .NET code.

    One of the confusing parts about using Parameters is figuring out where you should edit them and how.  They can be found on a Rendering item in the Parameters field of the Data section.  The field delimiters are an undocumented mystery.  However, after multiple searches through both Google and the SDN, the answer was found in a completely unrelated blog article (Thanks to John West).  The delimiter is an ampersand character, so these basically use Query String format.

    read more

     
  • Can't Login to Sitecore?


    Mark Graber headshot     

    Have you ever been locked out of your Sitecore login or have you forgotten or lost all know logins?  Don't worry, as long as you have access to the SQL Server database, you can take the following steps to get logged in again.  Read more for solution.

    read more

     
  • Aliases with Multiple Sites


    Mark Graber headshot     

    Beware of using Aliases in a Sitecore install that is running multiple sites.  We all know that you can run multiple sites on the same Sitecore install by using different hostName attributes on the <sites> node in the Web.config file. However, you can't have the same aliases across multiple sites.  For example, if you have a Solutions alias in your Sitecore install as shown below, this Alias can only point to one node in the content tree.  Therefore, it will point to that same node in the content tree for all "sites."  This can sometimes come by surprise and bewilderment if you inherit a project that is using aliases.  I recommend checking the location in the System folder shown below in the tree to see if there are any Aliases to be aware of.

    read more

     
  • Will additional development resources provide significant efficiencies with Sitecore development projects?


    Mark Graber headshot     

    Basic Conclusion
    At Oasis we suggest that the ideal project team for a typical Sitecore project consists of a maximum of 3 development resources and 2 project managers. The division consists of a chief architect that provides coordination, programming guidance, and QA controls, a front-end developer that provides expertise in HTML, CSS, and JavaScript, and a back-end developer that provides expertise in Sitecore API and ASP.NET backend coding. This team division provides each member with clearly defined roles that avoid reworking the same tasks that have already been completed by another programmer because the scope of each developer does not overlap. The project managers consist of a day-to-day project leader that facilitates communication between the client and development resources on a daily basis, and the second project manager is a typically a more senior and less involved manager on a daily basis. Their responsibility is to be the client’s internal champion and to keep in mind the broader perspective and overall project objectives. The team approach provides defined roles and cooperation that far exceed the capabilities of individuals wearing multiple hats.  Check out the full post for supporting language and data.

    read more

     
  • How to Remove Upload as Files Checkbox


    Mark Graber headshot     

    I have seen a common problem with Sitecore Media Library assets.  If users upload the files As Files using the checkbox shown below, you can run into problems in load balanced environments and environments with different websites for the Stage and Live databases.

    Upload as Files

    When you publish the media assets, their container or pointer is moved from the master to the web database in Sitecore, but the file assets in the file system are not moved by Sitecore.  You could setup a file replication application, but who wants to do that when there is an easier way. 

    read more

     
  • Selecting a Sitecore Vendor


    Nick Laidlaw headshot     

    As an established Sitecore certified partner, Oasis consults a variety of clients with Web Content Management (WCM) needs.  Every situation is unique but the team has found some common areas that may help your WCM vendor selection process.  You may be a CMO, Marketing Director or IT manager in charge of the vendor selection process for your web content management implementation.  You already understand the benefits of WCM and perhaps have selected a WCM such as Sitecore for your implementation.  First, congratulations on your selection.  Sitecore is a mature, robust content management platform that provides the support of a global corporate organization with a codebase that supports developer community contribution.  It offers the best of both the open-source and corporate worlds.  Oasis is a seasoned Sitecore certified partner with over twenty production implementations in a variety of industries and market verticals.  The team can work across the entire continuum of the project life-cycle.  Based on our adaptability and range of implementations we are qualified to offer the following recommendations for choosing a Sitecore vendor.

    read more

     
  • Access to the Path is Denied


    Mark Graber headshot     

    Have you ever zipped up a Sitecore website to move it to another server and received an error like the following?

    Access to the path 'c:\…\website\sitecore\shell\applications\debug\ducatshell.cs' is denied.

     Access to the path is denied.

    It is common to get this error because the debug folders to written to the file system by Sitecore at run time. Therefore, the permissions on the folders are tied to the ASPNET user from the source machine, which prevents the destination machine from being able to re-write those files.

    Read More for my solution.

    read more

     
  • Are Sitecore and SharePoint Friends or Foes?


    Nick Laidlaw headshot     

    Why choose between Sitecore and SharePoint?  Use them both if you need to but please don’t use SharePoint for your consumer facing website.

    At Oasis we consult with clients in many different industry verticals.  Their businesses and organizations are unique but their web content management issues at its core tend to be similar.  Many of them use SharePoint for their internal collaboration needs.  It’s common for clients to be confused about the need for, what they consider to be, an additional web content management platform when we recommend Sitecore.  Microsoft does a great job selling SharePoint as a full suite of tools, including web content management.  But, its web content management drawbacks are only evident once you’ve tried to deploy a visually stunning and flexible site.

    read more

     
  • Sitecore 6.2 Does NOT Include Analytics


    Nick Laidlaw headshot     

    I wanted to give everyone a heads up to save you some aggravation when working with Sitecore Analytics.  I'm using Sitecore 6.2 100104, and as far as we knew, this version of Sitecore comes with Sitecore Analytics.  As a matter of fact, it does have a link to the Sitecore Analytics application from the Sitecore start button.  You don’t have to install any packages to get that link, it’s there with the default installation.  So, you would think you have the actual application...think again!

    read more

     
  • Staging Module Publishing Targets


    Mark Graber headshot     

    The Sitecore Staging Module works great, allowing you to have a authoring environment on a local web server and publish content over the internet up to a hosted server containing a separate instance of Sitecore. There is a good PDF document that gets you on the right track for configuring the Staging Module titled, "Staging Module Installation and Configuration Guide." However, there is one key step that you may miss by following along in this guide. You will want to edit the following section of your Web.config file.


    <!-- PUBLISHING GROUPS
    Pipe separated list of default publishing groups.
    Groups in this list will be preselected in the Publish dialog.
    -->


    <setting
    name="DefaultPublishingTargets" value="Internet|WebSQL" />
    read more

     
  • EviBlog Install and Setup Instructions


    Mark Graber headshot     

    The EviBlog is located in the Sitecore Shared Source Library at http://trac.sitecore.net/EviBlog

    According to the Installation Guide, all you need to do is install the package and publish the site.  However, this did not work for me.  I was missing the items in the content tree.  I inspected the package.zip file for version 1.5, and there were definately no items in the content tree.  So, then I checked out the SVN module.

    read more

     
  • Welcome


    Mark Graber headshot     

    Hello all Sitecore developers.  I will be using this blog to share my experiences and insights with Sitecore.  I hope you find some of my tips helpful, and please share your comments with me too.

    read more