This blog post describes enhancements to the data source feature for presentation components in version 7 of the Sitecore ASP.NET web Content Management System. You can use data sources to specify data for each presentation component to retrieve.
Firstly, Sitecore 7 layout details always store the IDs of items, never their paths. As a result, there is no need to update references in layout details when you rename or delete data source items.
Secondly, Sitecore 7 tracks data sources in the links database, including data sources applied through page personalization and related features. When a user deletes a data source item, Sitecore 7 prompts them to remove, update, or break existing references.
Thirdly, Sitecore 7 supports search queries as data sources. In this context, the data source can indicate a number of items. In fact, you could always use search query strings, identifiers in external databases, and other values that do not specify an individual Sitecore item as data sources, but Sitecore features that expect data sources to specify Sitecore items will not work as expected.
In the Control Properties dialog, you can see the new Build Query command above the Data Source field in the General section.
You can use the Build Query command to specify a search query.
In this case, the value stored as the data source for the control is +text:test;, which we will need to evaluate at in the presentation component.
What this means is that not only can you specify a data source dynamically, such as an item or a data source search query, but that data source can specify a number of items determined subsequently at runtime.
You can continue to specify individual data source items as you have in previous versions, and Sitecore will still provide the context item. Without some effort, only some types of presentation components support search queries as data sources. For example, XSL renderings do not support search queries. Even for types of presentation components that do support them, developers must apply search queries when necessary, for example in sublayouts and MVC presentation components. You can code such components to expect a search query, a single item, a single data source item or multiple data source items, or both a single data source item or multiple data source items.
I have been using your Sublayout Parameter Helper and base class for quite a while (marketplace.sitecore.net/.../Sub_Layout_Parameter_Helper.aspx) - I'm really curious to see how to access these new Datasources from within our sublayouts now. Is an equivalent helper class available in Sitecore 7?
@Kevin: I have a working prototype for sublayouts - actually 5 more blogs on this topic coming (a helper class that invokes a pipeline to calculate data sources, then information on using that helper from sublayouts, web controls, XSL, and MVC views). And an update to SublayoutParameterHelper that includes this.