More in this section

Forums / Developing with Sitefinity / SearchBox external template?

SearchBox external template?

6 posts, 0 answered
  1. Diana
    Diana avatar
    16 posts
    Registered:
    26 Nov 2008
    08 May 2009
    Link to this post
    Hi,
    Is the SearchBox control template not available to replace with an external template? 

    If not, does this mean that my customizations to the SearchBox will be replaced on a new upgrade?  (I'm using 3.6 sp1)

    Thanks,
    Diana
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 May 2009
    Link to this post
    Hello Diana,

    SearchBox template is not embedded. You can find it and customize it under ~/Sitefinity/ControlTemplates/Search/SearchBox.ascx

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    11 Jun 2009
    Link to this post
    does this mean we can't map to a different template (so that it's not overwritten in the future)?
  4. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    11 Jun 2009
    Link to this post
    Hey SelArom,

    If you edit the SearchBox Advanced control properties there is a property called LayoutTemplatePath.  You could set a new path to your custom control template.  Then, during upgrade, your template would not be overwritten.

    This should work for now.  In future versions of Sitefinity this template will be embedded like other templates.

    Gabe Sumner
    http://www.sitefinitywatch.com/

  5. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    17 Jan 2010
    Link to this post
    What if you have multiple controls, and you want every drag\dropped version to use your external template?  I cant have my admins changing the external template path for every control they use.

    I tried adding the App_Data Configuration file as outlined on your site here http://www.sitefinitywatch.com/blog/09-03-19/Customizing_Sitefinity_Embedded_Templates.aspx

    But it doesn't seem to work on the front end...

    I've tried restarting IIS to apply the config change, but no change

    <?xml version="1.0" encoding="utf-8"?> 
    <controlsConfig> 
      <viewMap> 
        <viewSettings hostType="Telerik.Blogs.WebControls.BlogPosts"
          <additionalTemplates> 
            <add key="ItemListTemplatePath" layoutTemplatePath="~/usercontrols/ExternalTemplates/Blogs/ContentViewItemList.ascx" /> 
            <add key="SingleItemTemplatePath" layoutTemplatePath="~/usercontrols/ExternalTemplates/Blogs/ContentViewSingleItem.ascx" /> 
          </additionalTemplates> 
        </viewSettings> 
      </viewMap> 
    </controlsConfig> 

    I'm confused as to whether or not this is even possible...Ivans KB article says this
    "If you want to map the front end templates, you could simply set the path to the external template in the necessary control property (Edit Control -> Appearance)."


  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Jan 2010
    Link to this post
    Hello Steve,

    Map BlogPostsControlDesigner template and set the paths to your templates there. Thus, you do not have to set the templates through the control properties each time. You can find more information at this post

    Best wishes,
    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