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

Forums / Developing with Sitefinity / Mapping View to External Template

Mapping View to External Template

11 posts, 0 answered
  1. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    15 Feb 2009
    Link to this post
    I've moved a development project to Sitefinity 3.6 from 3.5 SP1. In doing so, I've lost the ability to enter/edit custom meta fields on the Admin side.  I can view the custom metafields data on the public side and the Admin side, but I cannot get the custom metafields themselves to display in the Admin interfaces for entry or edit.

    I assume this is because I need to map the Admin view to my custom ControlEditPanelEdit_Image.ascx template.  I have the Telerik.Sitefinity.Configuration.ControlsConfig.xml file created in the App_Data/Configuration folder.  I simply have no idea whatsoever what to enter for the hostType value.

    Thanks in Advance,

    Larry
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    16 Feb 2009
    Link to this post
    Hello Larry Brinley,

    Thank you for using our services.

    Here is the correct mapping that you should have in your Telerik.Sitefinity.Configuration.ControlsConfig.xml

    <viewSettings hostType="Telerik.Libraries.WebControls.Admin.LibraryItemEdit, Telerik.Libraries" 
    layoutTemplatePath="~/Sitefinity/Admin/Externel/Libraries/LibraryItemEdit.sft"
    </viewSettings> 

    Please not that ControlPanelEdit_Image.ascx has been changed to LibraryItemEdit.sft

    All the best,
    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. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    16 Feb 2009
    Link to this post
    The mapping does not work with my existing user control.  If I rename the 'old' user control and its resource file to LibraryItemEdit.sft, I get the following:

    The key "EditThisImage" is not defined for resource "Telerik.Libraries.Resources.Messages"

    If I leave the extension as .ascx, I receive a series of errors of the following type:

    A required control was not found in the template for "~/UserControls/Templates/Admin/Libraries/LibraryItemEdit.ascx...

    After adding one user control identified in the error message a similar message identifying the 'next' user control that is not defined is displayed.

    Perhaps you could provide the original LibraryItemEdit.sft file to me so that I can modify it?

    Thanks.
  4. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    16 Feb 2009
    Link to this post
    My issue was resolved when I found the following KB article:

    http://www.sitefinity.com/support/knowledge-base/kb-article/b1154K-bcge-b1154T-cgb.aspx

    Apparently, this article has been there since Friday and I simply missed it.

    Sorry to trouble you due to my failure to RTFM.
  5. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    17 Feb 2009
    Link to this post
    this kb article talks about how to map the admin control templates but what about the front end? I have custom control templates setup for all of my modules, and I can't find any examples on how to map these. Please let me know where to find this,

    thank you!
  6. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    17 Feb 2009
    Link to this post
    For GenericContent based modules, the controls have 'ItemListTemplate path' and 'SingleItemTemplate path' properties exposed under the Advanced configuration options under 'Appearance'.  These properties allow you to override the templates for the 'list' and 'details' views, respectively.

    If you need similar functionality for non-GenericContent based modules, I'm afraid I haven't a clue.  Perhaps a similar property exists for these, too?

    Hope it helps.
  7. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    18 Feb 2009
    Link to this post
    Hi Larry Brinley,

    This is correct. Josh, I also think that you would like to see this blog post - Answers to the Sitefinity 3.6 questions.

    Kind regards,
    Georgi
    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.
  8. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    22 Apr 2009
    Link to this post
    I have been unable to successfully override the ExpandableListTemplatePath value once I mapped it to a particular custom template in Telerik.Sitefinity.Configuration.ControlsConfig.xml.  In other words, I want to use multiple custom controls to display Explanable Lists throughout my site.  Problem is that no matter what value I put into that field, it always uses the template that I mapped in the config file.  Any thoughts / suggestions?

    Thanks,

    Zack
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    23 Apr 2009
    Link to this post
    Hello Zack,

    Which version of Sitefinity you use and for which is the problematic control. The mapping through advanced mode of the control designer is with higher priority than config mapping.

    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.
  10. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    23 Apr 2009
    Link to this post
    Ivan, I am running SF 3.6 HotFix 1 and the control in question is the ListDisplay control.  The content of the Telerik.Sitefinity.Configuration.ControlsConfig.xml is as follows:

    <?xml version="1.0" encoding="utf-8"?>
    <controlsConfig>
        <viewMap>
            <viewSettings hostType="Telerik.Lists.WebControls.ListDisplay">
                <additionalTemplates>
                    <!--Expandable list-->
                    <add key="ExpandableListTemplatePath" layoutTemplatePath="~/CustomControlTemplates/Lists/FAQ_ExpandableListTemplate.ascx" />
                </additionalTemplates>
            </viewSettings>
            <viewSettings hostType="Telerik.Cms.Engine.WebControls.HtmlContentEditor" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Generic_Content/EditorTemplate.ascx" />
        </viewMap>
    </controlsConfig>
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    24 Apr 2009
    Link to this post
    Hello Zack,

    There is no version "3.6 Hotfix 1". The last two releases are Sitefinity 3.6 Hotfix and Sitefinity 3.6 SP1. If you are using 3.6 Hotfix, I sugges that you should upgrade your project to SP1.
    However, here is how you should map the template through ControlsConfig file

       <viewSettings hostType="Telerik.Lists.WebControls.ListDisplay"
          <additionalTemplates> 
            <!--Simple list--> 
            <add key="ExpandedListTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Lists/ExpandedListView.ascx" /> 
            <!--Expandable list--> 
            <add key="ExpandableListTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Lists/ExpandableListView.ascx" /> 
        </viewSettings> 

    The template is called ExpandableListView.ascx ( as I see you are using an prefix FAQ, probably you have renamed something.)

    Also you can set the control to use an external template without making changes into config file. You can map the templates directly form the ListDisplay setting ExpandableListTemplatePath and ExpandedListTemplatePath properties to point to your external templates.

    I hope this helps.

    All the best,
    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.
Register for webinar
11 posts, 0 answered