More in this section

Forums / Developing with Sitefinity / Generic Content Module and the Tags Control

Generic Content Module and the Tags Control

6 posts, 0 answered
  1. Carl
    Carl avatar
    23 posts
    Registered:
    15 Jul 2008
    16 Oct 2008
    Link to this post

    I was wondering if there is anything special that has to be done to get the Tags control to work in a Generic Content Module?

    I copied the TagEditor control from the News Module over to my custom Generic Module, and it does appear on the page. However when I click on "Add" for "Add a new tag", the textbox goes away and the Tag control is empty.

    The Custom module has a categories control, which is working.

    Are there any plans on releasing the article/tutorial? ""Products" module – simple implementation with enabled tags"




  2. Nikolai
    Nikolai avatar
    216 posts
    Registered:
    01 Jun 2017
    17 Oct 2008
    Link to this post
    Hello Carl,

    The Tag Control has an option called Data -> Provider Name:
    If you specify the News as provider, the Tag Control will take all the tags from the it. It is the same for  the other Generic Content based modules.

    I hope this will help you.

    Sincerely yours,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Carl
    Carl avatar
    23 posts
    Registered:
    15 Jul 2008
    17 Oct 2008
    Link to this post
    Hi Nikolay, thanks for the response.

    I'm a bit confused. Both the News module and the Generic Content module have the following for their tags:

    <h3><asp:Literal ID="Literal3" runat="server" Text="<%$Resources:Tags %>"></asp:Literal></h3>   
    <fieldset class="set">   
         <ol class="setIn">   
              <li class="tags">   
                   <sfTag:TagEditor ID="tagsControl" runat="server" />   
              </li>   
         </ol>   
    </fieldset>  

    So I've copied this over to my own custom Generic Content module, and it does show up on the page.

    In the Source view, the tag control doesn't have a Provider property, and when I switch to Design view, the editMetaFields control, which the tag control is in, shows up as a grey box with the error "Error Rendering Control"

    I moved the Tag Control outside of the editMetaFields control, and it too has the same error message. If I go to its Properties, under Data there is only (Expressions).

    Am I going about this the wrong way, and I should be doing it differently?

    Thanks again,
    Carl J
  4. Jesse
    Jesse avatar
    21 posts
    Registered:
    28 Nov 2007
    17 Oct 2008
    Link to this post
    It's been my experience that the edit fields control does that (says there's an error when everything is fine)-- don't let it scare you.  My suggestion is to "just do it" and play with the control, making sure it saves.  I'm guessing it'll work just fine.

    Don't forget to add the tags to the edit controls as well (if you haven't done so already)
  5. Carl
    Carl avatar
    23 posts
    Registered:
    15 Jul 2008
    17 Oct 2008
    Link to this post
    Hi Jesse,

    The errors weren't scaring me, I was just pointing out that I wasn't able to see the Tag control in the design view, and that the Provider property wasn't in the Data section of the Properties. The tag control does show up in the page when I ran the application, it just wasn't saving the tags that I was adding.

    Nikolay,

    I got it to work :)

    I copied over TagEditor.ascx and TagsManagement.ascx to my Generic Content module. I didn't do this earlier, because I didn't think I had to. The Tag control was showing up in my Insert page.

    Thanks again,
    Carl J
    http://www.carlj.ca
  6. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    20 Oct 2008
    Link to this post
    Hello Carl,

    we are glad you were able to resolve the issue and would like to apologize that we were not able to put the code samples in the manual yet. Let us know if there is anything else we can do for you.

    @ Jessy
    Thank you for your input.

    All the best,
    Ivan
    the Telerik team

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