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

Forums / Developing with Sitefinity / Loading my custom template when a button pressed in the commad panel in the blogs

Loading my custom template when a button pressed in the commad panel in the blogs

2 posts, 0 answered
  1. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    02 Jan 2009
    Link to this post
    Hi

    In  Blogs module When the user clicks on the Tags link in the command panel Then the TagsManagement panel template is being loaded.

    Just like Tags i have another link button Services in the commad panel which is added by me.I want to load a different template when the user clicks on the Services link button.

    Can any one please tell me how to load my custom template in the control panel.

    Thanks
    Venkat.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    02 Jan 2009
    Link to this post
    Hi Venkat,

    For instance you could try to call your dialog when the button is clicked as below.

    '<%= Page.ResolveUrl("~/Sitefinity/YourControls/customDialogs/Mycustomdialog.aspx") %>' 

    or trying to get or set path of the external template that defines child controls of your control.

            public string TemplatePath 
            { 
                get 
                { 
                    object obj = this.ViewState["TemplatePath"]; 
                    if (obj == null
                        return "~/Templates/CustomTemplate.ascx"
                    return (string)obj; 
                } 
                set 
                { 
                    this.ViewState["TemplatePath"] = value; 
                } 
            }  

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered