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

Forums / Developing with Sitefinity / Content View - Tags mode error

Content View - Tags mode error

8 posts, 0 answered
  1. György
    György avatar
    3 posts
    Registered:
    23 Jan 2008
    31 Mar 2008
    Link to this post
    Hi everyone,

    We use Sitefinity 3.2 SP1 , and want to configure the Content View control to list only items from the News module, tagged with a specific tag  (for example, "tagg")

    Could you help me how to configure the Content View control  to achieve this?

    - I tried to set tagID property - but is hard to find out the tag GUID. I am a developer so I could get it from the database - it is not the best workaround for an end-user. (CMS administrator).

    - I tried to set TagID to "tagg" , the tag value but the result is an error message:

    'tagID' GUID cannot be null or empty GUID

    Do I have to set ParentID to a specific value?

    I am looking for a solution that is acceptable for an end-user who doesnt know anything about GUIDs and database access.

    Thank You,

    György
  2. György
    György avatar
    3 posts
    Registered:
    23 Jan 2008
    03 Apr 2008
    Link to this post
    sitefinity Team,

    I am wondering if you have a suggestion. Any help woud be appreciated.

    Thanks
    György
  3. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    04 Apr 2008
    Link to this post
    Hi György,

    Please excuse us for the delay. We will give you detailed explanation on Monday. However, until then, one suggestion is to try using a CustomDataSource. Just a note - this will be provided out of the box for the upcoming Service Pack 2 of Sitefinity 3.2.

    Greetings,
    Sonya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    08 Apr 2008
    Link to this post
    Hello György,

    You need to create a custom data source. This custom data source should return an IList object of News items, so you need to call the GetContent method which will return the desired content in the form of an IList object as well. (You need to reference the Telerik.Cms.Engine assembly.) There are several overloads of the GetContent method, but the following should be the most useful one:

    /// <summary> 
    /// Returns the list of all generic content objects for the specified starting position, maximum number, 
    /// sorting expression, status, parent ID and filtering expression. 
    /// </summary> 
    /// <param name="from">represents the starting position of the data source</param> 
    /// <param name="max">represents the maximum number of generic content objects that a data source returns</param> 
    /// <param name="sortExp">sorting expression</param> 
    /// <param name="tagName">Tag by which content is tagged</param> 
    /// <param name="status">content status</param> 
    /// <param name="parentId">the ID of the parent</param> 
    /// <param name="filter">an array of IMetaSearchInfo objects</param> 
    /// <returns>IList object</returns> 
    public override IList GetContent(int from, int max, string sortExp, string tagName, ContentStatus? status, Guid[] parentIDs, params IMetaSearchInfo[] filter) 

    Note there is a tagName parameter which specifies the tag name.

    The following should be returned by your data source:
    return this.Provider.GetContent(from, max, sortExp, tagName, nullnullnull); 

    Hope this helps.

    All the best,
    Sonya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. György
    György avatar
    3 posts
    Registered:
    23 Jan 2008
    08 Apr 2008
    Link to this post

    Hi Sonya,

    thank you for the example. Creating a custom content provider is a good and simple solution if using the Content View control. I'll implement this class.

    The Control Designer of the Content View control contains a lot of properties - it is a bit confusing. To make it eaiser for the end-user, I'll create some new User Controls that inherit the Content  View control , and write new Control Designers that display only a few properties.

    You mentioned Sitefinity 3.2 SP2. This release will include similar new controls?
     
    Thanks,
    György

  6. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    09 Apr 2008
    Link to this post
    Hi György,

    This functionality will be added as a new property for the existing control Content View.

    All the best,
    Sonya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Ben Alexandra
    Ben Alexandra avatar
    215 posts
    Registered:
    15 Sep 2012
    09 Apr 2008
    Link to this post
    Hi,

    That's great. 3.2 looks fantastic.  Do you have an estimated release date for 3.2 SP2?  Also, when do you expect 4.0 to be released (roughly ;).

    Thanks a lot

    Ben
  8. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    10 Apr 2008
    Link to this post
    Hello Ben Alexandra,

    Thank you for the positive feedback. Service Pack 2 of version 3.2 is scheduled for May. Version 4.0 is scheduled for the beginning of next year.

    Greetings,
    Sonya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
8 posts, 0 answered