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

Forums / Bugs & Issues / list of external template mapping errors, please help!

list of external template mapping errors, please help!

10 posts, 0 answered
  1. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    20 Feb 2009
    Link to this post
    So far I've been concentrating on upgrading my modules to work with the new sitefinity backend. that went pretty well!

    unfortunately I'm really struggling on getting the external template mapping to work with my custom templates... here are the issues i've encountered, please tell me if they are fixed in the hotfix or if I'm doing something wrong. thanks in advance!

    1) I downloaded the embedded templates from the KB, but they don't seem to be the correct. A lot of the css styles are wrong, for example NewsItemEdit.sft has a linkbutton on line 35, but it's not formed correctly (should have a strong tag with class "dark" to complete the button) and so the styling of the edit page is off. I had to fix this manually by copying from the events module, which I'm using the embedded templates for...

    2) All of my news items are showing up as "Uncategorized" in edit mode. if I look at them in preview mode, or in the live website, they are categorized correctly. additionally, if I change it to the correct category, then save it and come back to edit it, the correct category is now shown, but on the first load in edit mode it always says Uncategorized.

    3) how do I map external templates for a module with multiple providers?

    4) this is just a suggestion, but isn't there some way to have the embedded template generate input fields on the fly for meta items? I mean you already collect what type they are (string, int, datetime, etc) and based on that you could add default controls (textbox, datetimepicker, etc) dynamically to the page and set the id based on the metaname... that way we can add and remove meta fields without having to change the template UNLESS we need additional functionality that is not built in by default... just an idea. actually I though this is what you were already doing correct me if you've already said this before...

    I think we need a wiki or something dedicated to this new templating system because there are a lot of questions flying around in the various forums and it would be nice to have a central area to direct people to...

    thanks again for your help
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    23 Feb 2009
    Link to this post
    Hi SelArom,


    1) I downloaded the embedded templates from the KB, but they don't seem to be the correct. A lot of the css styles are wrong, for example NewsItemEdit.sft has a linkbutton on line 35, but it's not formed correctly (should have a strong tag with class "dark" to complete the button) and so the styling of the edit page is off. I had to fix this manually by copying from the events module, which I'm using the embedded templates for...
    We have provided new templates, which you may find in your Client.Net account.

    2) All of my news items are showing up as "Uncategorized" in edit mode. if I look at them in preview mode, or in the live website, they are categorized correctly. additionally, if I change it to the correct category, then save it and come back to edit it, the correct category is now shown, but on the first load in edit mode it always says Uncategorized.We have tried to reproduce this but to no avail. Do you mean page edit mode, or News item edit mode?

    3) how do I map external templates for a module with multiple providers?We have updated the KB Article How to map a view to an external template, in Sitefinity 3.6 or later? so it countains the required information now. Sorry for omitting this important part from it.


    4) this is just a suggestion, but isn't there some way to have the embedded template generate input fields on the fly for meta items? I mean you already collect what type they are (string, int, datetime, etc) and based on that you could add default controls (textbox, datetimepicker, etc) dynamically to the page and set the id based on the metaname... that way we can add and remove meta fields without having to change the template UNLESS we need additional functionality that is not built in by default... just an idea. actually I though this is what you were already doing correct me if you've already said this before...
    This is a nice idea, but what if someone wants to have a different control associated with the metafield? You might want to have a textbox, while I want to have a textarea. Still, I like the idea for default associated control, but this would be a kind of overhead - one more option to choose (to use the default control or not). Let me know if I am missing something :)

    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.
  3. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    23 Feb 2009
    Link to this post
    thanks for getting back to me, I figured out a lot of this over the weekend so I'll only come back if I hit new snags related to templating...

    but to expand on that last point, I realize that it's difficult to guess what control a user might need for a meta field, however, if the default doesn't suit them then that's what they would use the custom templates for. you could make a map like

    shorttext: TextBox
    longtext: TextBox (multiline)
    DateTime: datetimepicker
    bool: Checkbox

    the same way you do for the list of valid metafield types...

    that way by default, if i add a shorttext and call it "Stuff" the editcontrol will dynamically create a textbox with the id Stuff and add it to the metacontent fields area. If this is not what I want, I would have to override the default template with my own (which I have to do to add a field anyway right?) but if I don't need anything special then I won't have to do any extra work...

    just an idea I don't know how practical such an implementation would be...
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    24 Feb 2009
    Link to this post
    Hi Josh,

    I think it would be still practical. These cases and controls are used in 99% of the cases, when a new metafield is being added. We will think for this, and how we could have different controls defined as well.

    We would like to thank you about your suggestion.

    Sincerely yours,
    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.
  5. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    25 Feb 2009
    Link to this post
    alright I've found an issue, I think I might be doing somethign wrong here, please let me know...

    I'm trying to map a PUBLIC (not the admin, but what the website user sees) templates for EventsView. the controlsconfig.xml file has an entry for this:

        <viewSettings hostType="Telerik.Events.WebControls.EventsView">  
          <additionalTemplates> 
            <!--Item List--> 
            <add key="ItemListTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Events/ContentViewItemView.ascx" /> 
            <!--Single Item--> 
            <add key="SingleItemTemplatePath" layoutTemplatePath="~/Sitefinity/ControlTemplates/Events/ContentViewSingleItemView.ascx" /> 
          </additionalTemplates> 
        </viewSettings> 

    but when I load the page, it seems to be using the embedded template as I don't see my custom changes...

    I know that I can hard-wire the template into the eventview control, but that kind of seems to defeat the purpose of the xml file...

    do I have to do it manually?
  6. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    26 Feb 2009
    Link to this post
    Hi Josh,

    For the BlogPosts and EventsView controls, you need to do this manually:
    1. Click Edit to open EventsView property window.
    2. Switch to the Advanced tab.
    3. Set SingleItemTemplatePath and ItemListTemplatePath properties to point to the corresponding external template.
    4. Click I'm done to save the changes.

    Hope this helps.

    Greetings,
    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.
  7. Brook
    Brook avatar
    39 posts
    Registered:
    21 Mar 2007
    06 Mar 2009
    Link to this post
    I am having an issue with the Events module using an external display templete not showing either MS Map or the Google Map for my event.  I have checked that my Google API key is correct etc... so I know the map should be available.

    I am using the Community version of the 3.6 Hotfix, I have a page set-up to be the single item display for two other pages displaying Events Lists.  I opted to use an external template as I needed to change the sequence of the event page items.  I used the downloadable community version templates from my Client.net account, made the modifications to the template including removing the css link to the embedded css (is this an oversight?).  I went to the advanced tab on my events control on the page and selected the external template for it to use which is sitting in the Sitefinity Events Controls folder.  All of the other 'event field' items seem to show up fine except for the map.  When I revert back to using the compiled control, the map shows up fine.  So not sure if the ID reference in the template is wrong or not.
    <asp:Panel ID="mapPanel" runat="server" CssClass="sf_eventMap"></asp:Panel>

    I also noticed that when using the external control (ContentViewSingleItemView.ascx ) some of the other field items like Categories show up even if you uncheck the option on the Options UI.  Has anyone else had this issue and have the solution for getting the map to display? 

  8. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    06 Mar 2009
    Link to this post
    Hello Brook,

    The reason for the described problem with the map is that some of the controls in the EventsView  external template cannot be found. Currently, we cannot provide you with a workaround. This will be fixed in the upcoming service pack.

    Regarding the Categories issue, we cannot replicate it locally. So, it will be very helpful if you explain in more details the steps for reproducing it.

    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.
  9. Brook
    Brook avatar
    39 posts
    Registered:
    21 Mar 2007
    06 Mar 2009
    Link to this post
    Pepi,

    Thanks for the rapid response.  You have me a bit confused on why the control cannot be found and that there is no workaround for this.  Is this because the Events Module is not looking for them or cannot look for them or that we simply need to ensure the control id's are set-up correctly or renamed? 

    I know that the Events Module is able to utilize the external template as other controls on the page are being populated.  Is it because of the type of control on the page (e.g. the map utilizes a panel).  Hard to digest that it kind of work for some things and not others. 

    I will document the issue with the Categories showing when we have unchecked the show categories box, but my guess on this is that since the map is above that on the control page that the mechanism to show or populate controls after that one is being impacted or the same as what ever failure or identification issue that is starting above it.

    You mentioned a service pack release, has that been scheduled for deployment?

    Thanks as always! 

    Brook
  10. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    07 Mar 2009
    Link to this post
    Hello Brook,

    We used to search the controls in the single item container like this:

    Panel MapPanel = (Panel)itemContainer.FindControl("mapPanel"); 

    For the purpose of using external templates, the following approach should be used:

    GenericContainer genericContainer = itemContainer as GenericContainer; 
    if (genericContainer != null
        genericContainer.GetControl<Control>("mapPanel"false); 

    There is no workaround because you should actually implement your own EventsView control. In this particular case overriding is not an option because some of the methods are private and cannot be accessed.

    Regarding the Service Pack, it is scheduled for the end of March.

    Hope you will find the provided information helpful.

    Regards,
    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.
Register for webinar
10 posts, 0 answered