Tridion.Extensions.DynamicDelivery.Templates.Builder.BuildManager.BuildPage C# (CSharp) Метод

BuildPage() публичный Метод

public BuildPage ( Tridion.ContentManager.CommunicationManagement tcmPage, Engine engine ) : Tridion.Extensions.DynamicDelivery.ContentModel.Page
tcmPage Tridion.ContentManager.CommunicationManagement
engine Engine
Результат Tridion.Extensions.DynamicDelivery.ContentModel.Page
        public virtual Dynamic.Page BuildPage(TComm.Page tcmPage, Engine engine)
        {
            return PageBuilder.BuildPage(tcmPage, engine, this);
        }

Same methods

BuildManager::BuildPage ( Tridion.ContentManager.CommunicationManagement tcmPage, Engine engine, int linkLevels, bool resolveWidthAndHeight ) : Tridion.Extensions.DynamicDelivery.ContentModel.Page

Usage Example

 public Dynamic.Page GetDynamicPage(BuildManager manager)
 {
     Item item = Package.GetByName(Package.PageName);
     if (item == null)
     {
         Log.Error("no page found (is this a component template?)");
         return null;
     }
     Page tcmPage = (Page)Engine.GetObject(item.GetAsSource().GetValue("ID"));
     int linkLevels;
     if (HasPackageValue(Package, "LinkLevels"))
     {
         linkLevels = Convert.ToInt32(Package.GetValue("LinkLevels"));
     }
     else
     {
         GeneralUtils.TimedLog("no link levels configured, using default level " + this.DefaultLinkLevels);
         linkLevels = this.DefaultLinkLevels;
     }
     bool resolveWidthAndHeight;
     if (HasPackageValue(Package, "ResolveWidthAndHeight"))
     {
         resolveWidthAndHeight = Package.GetValue("ResolveWidthAndHeight").ToLower().Equals("yes");
     }
     else
     {
         GeneralUtils.TimedLog("no ResolveWidthAndHeight configured, using default value " + this.DefaultResolveWidthAndHeight);
         resolveWidthAndHeight = this.DefaultResolveWidthAndHeight;
     }
     Log.Debug("found page with title " + tcmPage.Title + " and id " + tcmPage.Id);
     Log.Debug("constructing dynamic page, links are followed to level " + linkLevels + ", width and height are " + (resolveWidthAndHeight ? "" : "not ") + "resolved");
     return manager.BuildPage(tcmPage, Engine, linkLevels, resolveWidthAndHeight);
 }