1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / WebSysTemplate how to use

WebSysTemplate how to use

6 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    02 Oct 2009
    Link to this post
    Hi Team,

    I tri to use one designer from internal resources.I have tried to use WebSysTemplate.cs. but get this error.

    using :Telerik.Framework.Web.Design.ControlDesigner
    protected const string RenderUIListDesignerTemplateName = "Proj.Web.UI.Resources.Designer.RenderUIListDesigner.ascx"
            /// <summary> 
            /// Loads an internal template that contains the controls & UI for the Control Designer. 
            /// </summary> 
     
            [Proj.Web.UI.WebSysTemplate(RenderUIListDesigner.RenderUIListDesignerTemplateName, "projList_Designer", "/Proj", true, "2009-02-17")] 
            public override string LayoutTemplatePath 
            { 
                get 
                { 
                        //return "~/UserControls/VistaWebUI/Designer/RenderUIListDesigner.ascx"; 
                    return RenderUIListDesigner.RenderUIListDesignerTemplateName; 
                } 
            } 

    The relative virtual path 'Project.Web.UI.Resources.Designer.RenderUIListDesigner.ascx' is not allowed here.


    Could you explian more how to use embeded templates. Exist some way to expose all my internal resources images, styles and use using the sf classes.
    regards.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    02 Oct 2009
    Link to this post
    Hello Pierre,

    Below is a sample code:

      [WebSysTemplate(MyControlDesigner.MyControlDesignerTemplateName, "MyControlDesigner_Desc""/My"false"2009-02-01")] 
            public string ItemTemplatePath 
            { 
                get 
                { 
                    return this.itemTemplatePath; 
                } 
                set 
                { 
                    this.itemTemplatePath = value; 
                } 
            } 
     
     
     
       ..... 
            ...... 
     
         protected override string LayoutTemplateName 
            { 
                get 
                { 
                    return MyControlDesigner.MyControlDesignerTemplateName; 
                } 
            } 
     
     
     
       ..... 
          ..... 
     
        public ITemplate ItemTemplate 
            { 
                get 
                { 
                    if (this.itemTemplate == null
                        this.itemTemplate = ControlUtils.GetTemplate(this.ItemTemplatePath, this.LayoutTemplateName, 
                                                                     this.GetType(), this.GetType(), this.GetType(), this.providerName); 
                    return this.itemTemplate; 
                } 
                set 
                { 
                    this.itemTemplate = value; 
                } 
            } 
     
    ...... 
        .... 
     
     
    private const string MyControlDesignerTemplateName = 
                "Telerik.Samples.Resources.ControlTemplates.Backend.MyControlDesigner.ascx"

    I hope this helps.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    02 Oct 2009
    Link to this post
    Hi,
    Many thanks Ivan!.
    Thats is for template designers, what about expose the other templates items like css or images used in designers. Exist some method to registering from code using some sf utility after getting all resource files in the assembly.
    Romi.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    02 Oct 2009
    Link to this post
    Hello Pierre,

    The logic for the other backend and frontend templates is the same.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    02 Oct 2009
    Link to this post
    Sorry,
    I´m stuck, but i don´t undestand. Templates are ok, Css files it´s seams that you use our resources
    <telerik:CssFileLink ID="CssFileLink1" EmbeddedFileName="..., but how to link one simple image from the resources like a logo or similar? I have may items to link and i searching the best solution to use programaticaly.

    regards.

     
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    04 Oct 2009
    Link to this post
    Hello Pierre,

    You can use CssFileLink to load an image from any folder of your website.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered