How to Create Content for the WebMatrix 2 Learn Pane
WebMatrix has a Help pane that shows relevant links when certain actions (called triggers) occur. Examples of triggers include creating a new file, creating a new database, or editing a file. These triggers allow WebMatrix to give users context-aware Help. Content providers can share an XML feed of articles that are displayed when triggers occur. This can increase the number of users who see their content.
If you are a content/documentation provider that writes articles or creates video to help others learn web development, you can have your learning content syndicated inside the WebMatrix environment!
In order to take advantage of this integration, you will need to create a specially formatted Atom feed which tells WebMatrix what content you want to make available, and at what times (conditions) you want to make it available. You can put this file online and WebMatrix will query it and cache it, much like how RSS clients handle RSS feeds.
In this article, we will describe the integration experience through conditions in the app, how to create the feed in the right format, and how to add it to WebMatrix.

Learning Triggers

WebMatrix has a selection of interesting states, or triggers, that it captures events for. When these occur, WebMatrix looks at the set of feeds it is currently indexing and fills a learning panel on the side of the application if there are any relevant entries in the feed for that event:
So when the user is performing some action in the IDE, relevant content can be presented to them at that opportune time - likely when they would find it most useful. A trigger fires by matching a defined "Condition" that is specific to that event - for example, a user entering the Database workspace might trigger the condition named "DatabaseWorkspace".
The result is that any content marked with that condition name (i.e. "DatabaseWorkspace") in your feed will be shown at that time.
Conditions may also have parameters - for example, an application ID from the Web Application Gallery or a NuGet package name might be necessary to narrow down the scope of what the user would need content for. The currently available conditions (and their respective identifiers and parameters if any) in WebMatrix include:
User Action
Condition Name
Being in the Site workspace with an Application Gallery app or template
appId (string identifier for the site/template from the WebPI feed)
Being in the Site workspace while working from scratch
Focusing on a CSS File
Focusing on a JScript File
Focusing on a CSHTML File
Focusing on a VBHTML File
Focusing on a PHP File
Focusing on an HTML File
Entering Files workspace
Entering Reports workspace (SEO)
Entering Databases workspace
Opening Site Settings Page
Opening Requests Page
Opening a database table
Opening a Report
Installing a NuGet package
(This list is subject to change after WebMatrix 2 Beta.)
More triggers may be added in future versions of WebMatrix, or via WebMatrix extensions that users can install.

Feed Structure

Your feed just needs to be in the Atom format with an additional custom namespace that adds a place for trigger definitions and OPML style outlining capabilities:
<feed xmlns='' xmlns:d=''>
The custom namespace allows you to create two new kinds of tags in each Atom <entry> block - ConditionRef tags that are used to identify which trigger the content should launch on and Outline tags that are used to lay out a hierarchy of content (if necessary).
Average entries in the feed will just be single links, so they will not need Outline nodes. They might look something like this:
<title>Your First Website Using WebMatrix</title>
<link href='' />
<d:ConditionRef id="KnownAppInSiteWorkSpace" appId="Wordpress" />
The <title> and <link> elements are used to render the link in the sidebar. The <d:DynamicHelp> block contains one <d:ConditionRef> element that points to a specific trigger ("KnownAppInSiteWorkspace" above) and passes in the required parameter of "appId" so the content will only be shown with that application.
The <id> element must be a unique identifier for this <entry> node - these are used to determine which articles are "new" to the user and notifications will be presented to them accordingly. One simple way to ensure they are unique is to use the URL for the content as the ID string.
Things can be more complex when you'd like to lay out a detailed hierarchy (e.g. for courses or series) or include many links for one particular trigger - that is where the <d:Outline> nodes come in.
Here is an example where there are three consecutive parts of a series, represented using the <d:Outline> nodes:
<title>Introduction to JavaScript</title>
<link href='' />
<d:ConditionRef id="JavaScriptFile" />
<d:Outline text='Part 1' uri=' of-3' type="article" />
<d:Outline text='Part 2' uri='' type="article" />
<d:Outline text='Part 3' uri='' type="article" />
Just like in OPML, each <d:Outline> node can have the following attributes in addition to the required text attribute:
Required for all nodes without children. Must be one of the following:
  • article
  • video
  • series
Describes the kind of content this node represents. This in turn informs WebMatrix on how to label the node in the learning panel (with an icon).
If this attribute is missing, the node must have children and this node will be interpreted as a header for those children.
Required for all nodes without children. Must be a full URL, including a valid protocol.
In the case of article or video types, this should be the URL to a web page containing the content.
In the case of series types, this should be a URL to a page that describes the series more in-depth (like the website hosting the series).
If this attribute is missing, the node must have children and this node will be interpreted as a header for those children.

Sample Files

This downloadable package includes:
  • An example of an full feed file that has multiple kinds of nodes and hierarchy, and exercises many kinds of triggers
  • A trigger definitions file which specifies all the available "ConditionRef" identifiers
  • An XSD schema file for the feed - this can be used for validation purposes
Download the samples here:

Adding a feed to WebMatrix

Users can add additional feeds to WebMatrix wherever they find them on the web, just by adding URLs to valid feeds using the WebMatrix interface. So you can create separate feeds for different purposes and provide links to them for your visitors - they can then add the feeds to WebMatrix in order to stay aware of your latest content while working on their websites.
To add a learning feed to WebMatrix, open the File application menu and select Options, on the Options dialog click on the Learning category on the left:

You can discuss this article using the adjacent Facebook talkback.

For technical questions please visit our discussion forums, where we have a vibrant community of developers like you, as well as Microsoft engineers who are ready to answer your questions!