(Apologies if this is a naff question, but I am pretty new to DD4T)
I am seeing some unexpected behavious in DD4T. We need to be able to retrieve a component, including the full URI for our client app.
I have a URI returned by Tridion.ContentDelivery.DynamicContent.Query
and the following code returns a component presentation:
IComponentPresentation cp = _componentPresentationFactory.GetComponentPresentation(uri);
But when I go and inspect the cp.Component object, I can only see ID field as:
I have also looked in the DD4T source on Github, and there is no URI property. The Component class inherits from RepositoryLocalItem, but that seems to be a Java object.
Is there a way to get the URI from the returned DD4T component?
Thanks for your help.
EDIT We are using Tridion.ContentDelivery.DynamicContent.Query functionality to search for components based on KeywordCriteria. But the user can select and search multiple times from the UI. Each search result URI is then used to retrieve the associated component via DD4T. We need to be able to filter out the results of previous searches, so that we only retrieve DD4T components for new found items. Problem is that Tridion.ContentDelivery.DynamicContent.Query returns full URIs, and DD4T only returns component IDs (without '-16'). So we cannot do a comparison between the two to identify previously returned components (without nasty string manipulation). Hope that clarifies it.