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

Forums / Bugs & Issues / 3.6 Maping Templates seem not work !

3.6 Maping Templates seem not work !

15 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    18 Feb 2009
    Link to this post
    Hi,

    After configuring using KB instruction I have added 3 templates for NewsItem. The Templates are placed in std folders. No Changes, only embeded templates are used. Regards.
     
    using :
    Sitefinity/admin/ControlTemplates/News and have .sft and sft.cs for codebehids.

    The App_Code/Configuration is placed like instructions and have the name 
    Telerik.Sitefinity.Configuration.ControlsConfig.xml
    and the code

    <?

     

    xml version="1.0" encoding="utf-8" ?>

     

    <

     

    controlsConfig>

     

    <

     

    viewMap>

     

     

     

     

    <!--

    News--><!--<viewSettings hostType="Telerik.News.WebControls.Admin.PromItemEdit, Telerik.News" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/ControlPanelEdit.sft"></viewSettings>-->

     

    <!--

     

    <viewSettings hostType="Telerik.News.WebControls.Admin.PromItemNew, Telerik.News" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/ControlPanelInsert.sft"></viewSettings>-->

     

    <!--

     

    <viewSettings hostType="Telerik.News.WebControls.Admin.PromItemsList, Telerik.News" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/ControlPanelList.sft"></viewSettings>-->

     

    <!--

     

    News2-->

     

    <

     

    viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemsList`1[[Telerik.News.WebControls.Admin.NewsItemsView, Telerik.News]]" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/ControlPanelList.sft"></viewSettings>

     

    <!--

     

    Edits a news item -->

     

    <

     

    viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemEdit`1[[Telerik.News.WebControls.Admin.NewsItemsView, Telerik.News]]" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/ControlPanelEdit.sft"></viewSettings>

     

    <!--

     

    Inserts a news item -->

     

    <

     

    viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemNew`1[[Telerik.News.WebControls.Admin.NewsItemsView, Telerik.News]]" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/ControlPanelInsert.sft"></viewSettings>

     

    </

     

    viewMap>

     

    </

     

    controlsConfig>

     

     
  2. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    18 Feb 2009
    Link to this post
    Sorry for code,

    The mapping seens not working in my dev. version net2. No action, no error, using mistakes, changing paths always same embedded templates. Added resources for these files no changes. Plz control. Regards.
  3. Pepi
    Pepi avatar
    981 posts
    Registered:
    28 Oct 2016
    19 Feb 2009
    Link to this post
    Hi Pierre,

    First of all the configuration file should be placed in ~/App_Data/Configuration/ folder (not in ~/App_Code/Configuration/). Also, in the official release of v3.6 there are some problems with using external templates which will be solved in the upcoming hotfix.

    All the best,
    Pepi
    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.
  4. Scott Wheeler
    Scott Wheeler avatar
    4 posts
    Registered:
    17 Aug 2004
    20 Feb 2009
    Link to this post
    I couldn't find anything on how to configure different templates to use for different providers.

    Previously, when new news providers are configured, we can just make corresponding new fold inside of sitefinity->admin->controltemplates and copy over the templates from News. Any changes will be used.

    Has KB article updated?
  5. Pepi
    Pepi avatar
    981 posts
    Registered:
    28 Oct 2016
    23 Feb 2009
    Link to this post
    Hi Scott Wheeler,

    In Sitefinity v3.6 and later you don't need to make any changes to the templates in order to use custom providers. All you have to do is add the custom provider settings in the project web.config file. So it will be very helpful if you explain in details what problems you have experienced and we will try to figure out what's wrong.

    Thanks for your cooperation in advance.

    Best wishes,
    Pepi
    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.
  6. Scott Wheeler
    Scott Wheeler avatar
    4 posts
    Registered:
    17 Aug 2004
    23 Feb 2009
    Link to this post
    Yes, I tried the latest 3.6 hotfix. Now the external templates worked.

    We are not using any custom providers. We just configure additional news providers in web.config to control user permissions and use different templates for a few different types of news based on built-in news module. For example in 3.5, when we add a provider of "PressRelease", we just make a new folder PressRelease under controltemplates within sitefinity admin folder. We can make neccessary changes to the templates from there.

    However, with 3.6 hotfix, even though I can configure to use external templates for news module, I can't find anyway to configure or setup to use different templates for different news provider. Is this still possible with 3.6? If yes, can you provide some example or point me to appropriate documentation?

    Thanks.

  7. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    23 Feb 2009
    Link to this post
    Hello Scott Wheeler,

    We have updated the KB Article How to map a view to an external template, in Sitefinity 3.6 or later? so it provides information now on how to map Views for additional content providers. Please check it now. I apologize for the inconvenience, we had to include this information earlier.

    All the best,
    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. Scott Wheeler
    Scott Wheeler avatar
    4 posts
    Registered:
    17 Aug 2004
    24 Feb 2009
    Link to this post
    I followed updated KB. However, everything seems to work fine when I run the project within Visual Studio. When I run the project under IIS, it got compilation error The resource object with key 'BackToAllNewsItems' was not found.
    on /Sitefinity/Admin/ControlTemplates/News/NewsItemNew.ascx.

    I know your resource files are marked internal, but why does it matter to a template? Am I missing something?

    Thanks.
  9. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    25 Feb 2009
    Link to this post
    if you're using an external template, it will try to read external resources, so make sure to also copy the App_LocalResources folder into your external templates folder and also be sure that the filenames inside of this folder correspond to the filenames of your external templates.

    forexample if your template is NewsList.ascx, then make sure you have a NewsList.ascx.resx file that declares the resource strings your control uses...

    I hope this was helpful
  10. MNP
    MNP avatar
    79 posts
    Registered:
    23 Apr 2008
    25 Feb 2009
    Link to this post
    Where are these App_LocalResources for blogs in 3.6?

    In 3.5 they're under Sitefinity\ControlTemplates\Blogs\App_LocalResources. I grabbed these and moved them over to a 3.6 project and everything works fine. Has anything changed in between the 2 versions?

    Thanks

    -Matt
  11. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    25 Feb 2009
    Link to this post
    this is exactly what I did :)

    however, the app_localresources folder is included in the sitefinity external templates that should be available in your client.net downloads section.

    remember that since by default sitefinity uses the embedded templates, it looks for the embedded resources. if you map an external template, then you have to supply your own external resources...

    but again thankfully you can use the templates in client.net as a starting point, as they include their own resource file.

    i hope this was helpful
  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Feb 2009
    Link to this post
    Hello SelArom,

    Just a follow up.

    You can use the templates from your old project and the resource for them after they have been mapped in
    ~/Configuration/Telerik.Sitefinity.Configuration.ControlsConfig.xml

    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.
  13. Jeff
    Jeff avatar
    124 posts
    Registered:
    05 Aug 2007
    28 Feb 2009
    Link to this post

    Thanks SelArom for pointing out that you need the .resx file as well as the .ascx file. This is nowhere in the KB article.

    Ivan, Georgi- can you add this to the article for the beneift of others who will certainly hit this stumbling block?

    Jeff

  14. Jeff
    Jeff avatar
    124 posts
    Registered:
    05 Aug 2007
    28 Feb 2009
    Link to this post

    Thanks SelArom for pointing out that you need the .resx file as well as the .ascx file. This is nowhere in the KB article.

    Ivan, Georgi- can you add this to the article for the beneift of others who will certainly hit this stumbling block?

    Jeff

  15. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    02 Mar 2009
    Link to this post
    Hello Jeff and Josh,

    Thank you for providing feedback regarding the KB article. I have added some notes about the requirement of having external resource files for the external templates.

    Let us know if we could assist any further.

    Regards,
    Sonya
    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
15 posts, 0 answered