DD4T/DD4T.Providers.DxaModelService/TridionPageProvider.cs
/// <summary>
/// Gets the raw string (xml) from the broker db by URI
/// </summary>
/// <param name="Url">TCM URI of the page</param>
/// <returns>String with page xml or empty string if no page was found</returns>
Gets the raw string (xml) from the broker db by URI
Gets the raw string ( xml ) from the broker db by URI
public string GetContentByUri(string tcmUri)
        {
            LoggerService.Debug(">>DD4T.Providers.DxaModelService::GetContentByUri({0})", LoggingCategory.Performance, tcmUri);
            string content = null;
            TcmUri tcm = new TcmUri(tcmUri);
            PageMetaFactory metaFactory = GetPageMetaFactory(tcm.PublicationId);            
            PageModelRequest req = new PageModelRequest
            {
                PublicationId = tcm.PublicationId,
                DataModelType = DataModelType.DD4T,
                PageInclusion = PageInclusion.INCLUDE,
                Path = metaFactory.GetMeta(tcm.ItemId).UrlPath
            };
            try
            {
                content = ModelServiceClient.PerformRequest(req).Response;
            }
            catch
            {
            }
            return content;
        }
public string GetContentByUri ( string tcmUri ) { LoggerService . Debug ( " " , LoggingCategory . Performance , tcmUri ) ; string content = null ; TcmUri tcm = new TcmUri ( tcmUri ) ; PageMetaFactory metaFactory = GetPageMetaFactory ( tcm . PublicationId ) ; PageModelRequest req = new PageModelRequest { PublicationId = tcm . PublicationId , DataModelType = DataModelType . DD4T , PageInclusion = PageInclusion . INCLUDE , Path = metaFactory . GetMeta ( tcm . ItemId ) . UrlPath } ; try { content = ModelServiceClient . PerformRequest ( req ) . Response ; } catch { } return content ; }
Gets the raw string (xml) from the broker db by URI
Gets the raw string ( xml ) from the broker db by URI
//  LoggerService.Debug(">>DD4T.Providers.DxaModelService::GetContentByUrl({0}) returns {1}", LoggingCategory.Performance, tcmUri, content);
String with page xml or empty string if no page was found
String with page xml or empty string if no page was found
tcmUri
string
Url
TCM URI of the page
TCM URI of the page